You are on page 1of 3

Microsoft Windows [Versi�n 6.3.

9600]
(c) 2013 Microsoft Corporation. Todos los derechos reservados.

C:\Users\SALA6>cd /�
El sistema no puede encontrar la ruta especificada.

C:\Users\SALA6>cd /

C:\>cd xampp/mysql/bin

C:\xampp\mysql\bin>mysql -u root
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 2
Server version: 10.1.10-MariaDB mariadb.org binary distribution

Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> show databases;


+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| phpmyadmin |
| test |
+--------------------+
5 rows in set (0.09 sec)

MariaDB [(none)]> create database db_restaurante;


Query OK, 1 row affected (0.02 sec)

MariaDB [(none)]> show databases;


+--------------------+
| Database |
+--------------------+
| db_restaurante |
| information_schema |
| mysql |
| performance_schema |
| phpmyadmin |
| test |
+--------------------+
6 rows in set (0.00 sec)

MariaDB [(none)]> use db_restarurante


ERROR 1049 (42000): Unknown database 'db_restarurante'
MariaDB [(none)]> use db_restarurante;
ERROR 1049 (42000): Unknown database 'db_restarurante'
MariaDB [(none)]> use db_restaurante;
Database changed
MariaDB [db_restaurante]> CREATE TABLE proveedor(
-> prov_id int(9) AUTO_INCREMENT PRIMARY KEY NOT NULL,
-> prov_nombre varchar(100) NOT NULL,
-> prov_direccion varchar(50) NOT NULL,
-> prov_nit varchar(30) NOT NULL,
-> prov_telefono varchar(20) NOT NULL,
-> prov_email varchar(60)NOT NULL
-> );
Query OK, 0 rows affected (0.47 sec)

MariaDB [db_restaurante]> show tables;


+--------------------------+
| Tables_in_db_restaurante |
+--------------------------+
| proveedor |
+--------------------------+
1 row in set (0.03 sec)

MariaDB [db_restaurante]> describe proveedor;�


+----------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------------+--------------+------+-----+---------+----------------+
| prov_id | int(9) | NO | PRI | NULL | auto_increment |
| prov_nombre | varchar(100) | NO | | NULL | |
| prov_direccion | varchar(50) | NO | | NULL | |
| prov_nit | varchar(30) | NO | | NULL | |
| prov_telefono | varchar(20) | NO | | NULL | |
| prov_email | varchar(60) | NO | | NULL | |
+----------------+--------------+------+-----+---------+----------------+
6 rows in set (0.08 sec)

-> describe proveedorBye


Ctrl-C -- exit!

C:\xampp\mysql\bin>
C:\xampp\mysql\bin>mysql -u root
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 3
Server version: 10.1.10-MariaDB mariadb.org binary distribution

Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> show databases;


+--------------------+
| Database |
+--------------------+
| db_restaurante |
| information_schema |
| mysql |
| performance_schema |
| phpmyadmin |
| test |
+--------------------+
6 rows in set (0.00 sec)

MariaDB [(none)]> db_restaurante


-> show databases;^Z^XBye
Ctrl-C -- exit!

C:\xampp\mysql\bin>mysql -u root
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 4
Server version: 10.1.10-MariaDB mariadb.org binary distribution
Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> use db_restaurante;


Database changed
MariaDB [db_restaurante]>

You might also like