Linux Terminal Connect to Remote Mysql

You can connect to Mysql with command line.

This comamnd works for locale and remote. If you connect to your server with ssh, you can connect to mysql easily.

[bash]
mysql -h DB_SERVER_NAME -u DB_USER -p DB_NAME
[/bash]

DB_SERVER_NAME: Usually it can be “localhost”. Sometimes it can be IP
DB_USER: The name of user which has permission to access yo DB
DB_NAME: The name of DB

After enter this command line, system will ask you “password”. If you write the password, you can connect to mysql.