Knowledgebase: Using mySQL
How do I connect to mySQL via SSH?
Posted by Roy Petersen on Feb-15-2007 12:16 PM
Use the following outline to connect and begin querying the mySQL server from SSH. Remember that you cannot connect to your databases remotely due to security concerns, you can only connect from localhost .

1. Connect To The mySQL Server
servername:/> mysql -u USERNAME -p
Enter Password: PASSWORD

2. Connect To The Database
mysql> use DATABASENAME;

3. Receiving Help
mysql> help