MySQL Tutorial - Connecting To The Server
Any session starts by connecting to the MySQL server. For API's which
require a servername, use localhost.
The example below shows you how to connect to the server from a unix shell (over an SSH connection).
# mysql -u username -p|
Enter password: ******
Replace username with the MySQL user
and ****** with the password created for your hosting account.
Use supportbot to
create a username and database for your hosting account if you have
not already done so.
Once logged in, you'll see something like the below.
Welcome to the MySQL monitor. Commands end with ; or \g.|
Your MySQL connection id is 674464 to server version: 3.23.40-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
Once have connected successfully, you can disconnect any time by typing QUIT at the mysql> prompt.
For examples of what you can do while connected, move on to the queries documentation section.