Comando Mysql
Microsoft Windows [Versión 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Reservados todos los derechos.
C:\Users\01062-10>cd/xampp/mysql/bin
C:\xampp\mysql\bin> mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.11 MySQL Community Server (GPL)
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databasees;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'datab
asees' at line 1
mysql>
mysql>
mysql>
mysql>
mysql>
mysql>
mysql>
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| cdcol |
| data |
| mysql |
| performance_schema |
| phpmyadmin |
| test |
| webauth |
+--------------------+
8 rows in set (0.15 sec)
mysql> create
-> sintaxis
-> create database nombre de la B.D;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'sinta
xis
create database nombre de la B.D' at line 2
mysql> create
-> create biblioteca;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'creat
e biblioteca' at line 2
mysql> create
-> create database biblioteca;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'creat
e database biblioteca' at line 2
mysql> create
-> sintaxis
-> create database biblioteca;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'sinta
xis
create database biblioteca' at line 2
mysql> create database biblioteca;
Query OK, 1 row affected (0.03 sec)
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| biblioteca |
| cdcol |
| data |
| mysql |
| performance_schema |
| phpmyadmin |
| test |
| webauth |
+--------------------+
9 rows in set (0.00 sec)
mysql> use biblioteca
Database changed
mysql> use biblioteca;
Database changed
mysql> chow tables;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'chow
tables' at line 1
mysql> show tables;
Empty set (0.00 sec)
mysql> create table libro
-> (cod-lib char(10)not null primary key,
->
-> ;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near '-lib
char(10)not null primary key,' at line 2
mysql> create table libro
-> (cod_lib char(10)not null primary key,
-> nom_lib char(40) not null);
Query OK, 0 rows affected (0.30 sec)
mysql>
cmd
Microsoft Windows [Versión 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Reservados todos los derechos.
C:\Users\01062-10>cd/xampp/mysql/bin
C:\xampp\mysql\bin> mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.11 MySQL Community Server (GPL)
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databasees;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'datab
asees' at line 1
mysql>
mysql>
mysql>
mysql>
mysql>
mysql>
mysql>
mysql> show databases; sirve para ver las bases de datos que se llevan hasta el momento
+--------------------+
| Database |
+--------------------+
| information_schema |
| cdcol |
| data |
| mysql |
| performance_schema |
| phpmyadmin |
| test |
| webauth |
+--------------------+
8 rows in set (0.15 sec)
mysql> create
-> sintaxis
-> create database nombre de la B.D;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'sinta
xis
create database nombre de la B.D' at line 2
mysql> create
-> create biblioteca;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'creat
e biblioteca' at line 2
mysql> create
-> create database biblioteca;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'creat
e database biblioteca' at line 2
mysql> create
-> sintaxis
-> create database biblioteca;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'sinta
xis
create database biblioteca' at line 2
mysql> create database biblioteca;
Query OK, 1 row affected (0.03 sec)
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| biblioteca |
| cdcol |
| data |
| mysql |
| performance_schema |
| phpmyadmin |
| test |
| webauth |
+--------------------+
9 rows in set (0.00 sec)
mysql> use biblioteca
Database changed
mysql> use biblioteca;
Database changed
mysql> chow tables;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'chow
tables' at line 1
mysql> show tables;
Empty set (0.00 sec)
mysql> create table libro
-> (cod-lib char(10)not null primary key,
->
-> ;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near '-lib
char(10)not null primary key,' at line 2
mysql> create table libro
-> (cod_lib char(10)not null primary key,
-> nom_lib char(40) not null);
Query OK, 0 rows affected (0.30 sec)
mysql> show table
->
-> ;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near '' at
line 1
mysql>
mysql>
mysql> show tables;
+----------------------+
| Tables_in_biblioteca |
+----------------------+
| libro |
+----------------------+
1 row in set (0.00 sec)
mysql> decribe libro;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'decri
be libro' at line 1
mysql> describe libro;
+---------+----------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------+----------+------+-----+---------+-------+
| cod_lib | char(10) | NO | PRI | NULL | |
| nom_lib | char(40) | NO | | NULL | |
+---------+----------+------+-----+---------+-------+
2 rows in set (0.04 sec)
mysql> create table autor
-> (cod_aut char(10) not null primary key,
-> nom_aut char(40) not null);
Query OK, 0 rows affected (0.15 sec)
mysql> show tables;
+----------------------+
| Tables_in_biblioteca |
+----------------------+
| autor |
| libro |
+----------------------+
2 rows in set (0.00 sec)
mysql> describe autor;
+---------+----------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------+----------+------+-----+---------+-------+
| cod_aut | char(10) | NO | PRI | NULL | |
| nom_aut | char(40) | NO | | NULL | |
+---------+----------+------+-----+---------+-------+
2 rows in set (0.03 sec)
mysql> create fable lib_aut
-> (cod_lib char(10) not null,
-> cod_aut char(10) not null,
-> foreign key(cod_lib) references libro(cod_lib)
-> on delete cascade on update cascade,
-> foreign key(cod_aut) references autor(cod_aut)
-> on delete cascade on update cascade);
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'fable
lib_aut
(cod_lib char(10) not null,
cod_aut char(10) not null,
foreign key' at line 1
mysql> showm tables;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'showm
tables' at line 1
mysql>
mysql>
mysql> create fable lib_aut
-> (cod_lib char(10) not null,
-> cod_aut char(10) not null,
-> foreign key (cod_lib)
-> references libro(cod_lib)
-> on delete cascade on update cascade,
-> foreign key (cod_aut) reference;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'fable
lib_aut
(cod_lib char(10) not null,
cod_aut char(10) not null,
foreign key' at line 1
mysql> create fable lib_aut
-> (cod_lib char(10) not null,
-> cod_aut char(10) not null,
-> foreign key(cod_lib) references libro(cod_lib) on delete cascade on updet
e cascade,
-> foreign key(cod_aut) references autor(cod_aut) on delete cascade on updet
e cascade);
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'fable
lib_aut
(cod_lib char(10) not null,
cod_aut char(10) not null,
foreign key' at line 1
mysql> create table lib_aut
-> (cod_lib char(10) not null,
-> cod_aut char(10) not null,
-> foreign key(cod_lib) references libro(cod_lib) on delete cascade on updet
e cascade,
-> foreign key(cod_aut) references autor(cod_aut) on delete cascade on updet
e cascade);
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'updet
e cascade,
foreign key(cod_aut) references autor(cod_aut) on delete cascade' at line 4
mysql> create fable lib_aut
-> ;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'fable
lib_aut' at line 1
mysql> create table lib_aut
-> (cod_lib char(10) not null,
-> cod_aut char(10) not null,
-> foreign key(cod_lib) references libro(cod_lib) on delete cascade on updat
e cascade,
-> foreign key(cod_aut) references autor(cod_aut) on delete cascade on updat
e cascade);
Query OK, 0 rows affected (0.28 sec)
mysql> exit
bye
C:\xampp\mysql\bin>mysqldump -B -uroot -p biblioteca> d:/biblioteca.sql
Enter password:
C:\xampp\mysql\bin>
C:\xampp\mysql\bin>
https://www.dropbox.com/sh/qak1ftvn75gmt9q/QtDHBbsr8R
REGISTRO ESTUDIANTE
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| cdcol |
| data |
| mysql |
| performance_schema |
| phpmyadmin |
| test |
| webauth |
+--------------------+
8 rows in set (0.06 sec)
mysql> create table estudiante
-> (cod_estu chart(10)not null primary key,
-> nom_estu chart(4;
ERROR 1046 (3D000): No database selected
mysql> create table estudiante
-> (cod_estu char(10)not null primary key,
-> nom_estu chart(40) not null
->