Frequently Asked Questions

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)

  1. Log on to your server.
  2. At the command line, type su -. This gives you root access.
  3. At the command line, type mysql -uadmin -p`cat /etc/psa/.psa.shadow`
  4. 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)

  1. Log on to your server.
  2. At the command line, type su -. This gives you root access.
  3. At the command line, type mysql -uroot -p
  4. Enter your MySQL root password.
  5. NOTE: MySQL's default root password is an empty string (no password is set).