You can connect to the server using SSH, once logged into the system you can access MySQL directly using the following command:-
mysql -h serverip -u username -p databasename
(note the server IP will be provided in the MySQL databases section of the hosting control panel)
You will then be prompted for the password for the database. This will then place you at the MySQL prompt, for information on the commands that you can then use please refer to the online documentation at
http://www.mysql.com/documentation
**Advanced Configuration**
If you wish to avoid using -h in the command to specify the host then you can do so by creating a .my.cnf file in your web space located in the root directory and this should contain the following:
[client]
host = IP of server
As before the IP would be found from the MySQL databases section of the hosting control panel but creating this file basically specifies the host that is selected when you use the mysql command from ssh ensuring you always connect to the correct server.
If you would like to automate login entirely it is possible to create a login configuration file and pass it to the mysql binary. The script should contain the following lines:
[client]
host="xxx.xxx.xxx.xxx"
user="username"
password='password'
database="database"
And it can be called with the following invocation
mysql --defaults-file="~/myfile.cnf" -A