Suso Logo suso
Support Site
main site     webmail    

MySQL databases can be accessed either from the command line via an SSH shell login or through a web application. This tutorial explains how to get started using a shell login. For information on how to login to your account via SSH, please read The mysqlinfo file.

First, get the password that you need from the file

/home/username/private/mysqlinfo

You can do this by using the following command:

cat /home/username/private/mysqlinfo

This will show you the contents of that file. The password is the part inbetween the first and second colon.

Now run the following command:

mysql -h mysql.suso.org -u username -p username_databasename

Where 'databasename' is the actually name of the database you want to use. Most likely, when your database account was setup, we created one for you called username_main.

It will now prompt you for your database password. Type or paste in the password and hit enter. You will not see anything be entered when you type in the password. Your screen should look something like this now:

[username@shell.suso.org username]$ mysql -h mysql.suso.org -u username -p username_main Enter password: Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 645798 to server version: 4.0.21-standard Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql>

The 'mysql>' is simular to a shell prompt you see when logging in via SSH. It is letting you know that the MySQL server is ready for your commands and input. Try the following MySQL command to show you the databases that are owned by you:

SHOW DATABASES LIKE "username_%";

At this point you will probably only have one database called username_main. If you don't have any, that's fine, we'll create one. Execute the following MySQL query:

CREATE DATABASE username_test;

The mysql shell should give you output simular to the following:

Query OK, 1 row affected (0.15 sec)

This just lets you know that the query that you ran executed ok, it affected 1 row and how long it took to execute.