How do I access MySQL using SSH?
Last Updated:
May 4, 2006 10:50 AM
The steps to access your MySQL database vary depending on whether Plesk is installed on your server.
To Access MySQL Using SSH (Plesk installed)
- Log on to your server.
- At the command line, type
su-. This gives you root access. - At the command line, type
mysql -uadmin -p`cat /etc/psa/.psa.shadow`
NOTE: To reset your MySQL password, at the command line, type mysqladmin -u admin -psetup password $PW
To Access MySQL Using SSH (Plesk not installed)
- Log on to your server.
- At the command line, type
su-. This gives you root access. - At the command line, type
mysql -uroot -p - Enter your MySQL root password.
NOTE: MySQL's default root password is an empty string (no password is set).
