A Gentle Introduction to

SQL

Running MySQLgoogleMySQL De Funcionamiento

Name of the server mysqld or mysqld.exe
Name of the client mysql or mysql.exe
Typical command line to start the client c:\mysql\bin\mysql -h pc236nt.napier.ac.uk -u scott -p gisqgooglec:\mysql\bin\mysql - h pc23ñt.napier.ac.uk - scott de u - gisq de p

pc236nt.napier.ac.ukgooglepc23ñt.napier.ac.uk
the internet address of a computer running the servergoogleel internet address de una computadora que funciona el servidor
scott
the user namegoogleel nombre del usuario
gisq
the name of the database to usegoogleel nombre de la base de datos a utilizar
-p
forces a prompt for passwordgooglefuerza un aviso para la contraseña
Useful commands
show tables;
describe tableX;
use databaseY;
help
source file.txt
Beware! Foreign keys are not enforced. Table names are case sensitive when running on Unix

The MySQL client is called mysql. googleLlaman el cliente de MySQL mysql.

C:\>c:\mysql\bin\mysql -h pc236nt.napier.ac.uk -u scott -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 33601 to server version: 3.23.43-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.


mysql>use gisq
Database changed
mysql>SELECT name FROM cia;
...
| Western Sahara                               |
| Yemen                                        |
| Zambia                                       |
| Zimbabwe                                     |
+----------------------------------------------+
261 rows in set (0.01 sec)

mysql>exit

Some useful commands in MySQL:googleAlgunos comandos útiles en MySQL: