How do I connect to MySQL databases through SSH?


You can log into the server through SSH, and once you are in the system, you can access your MySQL databases directly with the following command:

mysql -h [serverip] -u [username] -p [databasename]

[serverip] – The server’s IP address, which you can find in the ‘MySQL Databases’ section in your eXtend Control Panel

[username] – Your username

[databasename] – The database’s name

You will then be prompted to enter in the database’s password. Once you have logged into the database, you will be at the MySQL prompt.

For more information on the commands you can use in the MySQL prompt, please refer to the MySQL Documentation: http://dev.mysql.com/doc/



Article ID: 8
Created On: Thu, Feb 26, 2015 at 4:51 PM
Last Updated On: Wed, Aug 18, 2021 at 11:11 AM

Online URL: https://www.heartinternet.uk/support/article/how-do-i-connect-to-mysql-databases-through-ssh.html