What is the root password for MySQL?

Created:

2016-11-16 12:45:00 UTC

Modified:

2017-08-16 17:54:25 UTC

36

Was this article helpful?


Have more questions?

Submit a request

What is the root password for MySQL?

Applicable to:

  • Plesk for Windows
  • Plesk for Linux

Question

What is the root password for MySQL?

Answer

Plesk renames root MySQL account to admin when Plesk is installed. To get root privileges in MySQL simply login with the admin username instead. The password is the same as the admin password in Plesk.
Plesk admin password stored in file /etc/psa/.psa.shadow is encrypted.

Starting from Plesk Onyx, it's not possible to obtain the password in plain text. Use the following command to login to mysql with root privileges (applicable to Plesk Onyx and any other Plesk version):
Linux:

# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin

Windows:

"%plesk_dir%\\MySQL\\bin\\mysql" -P8306 -uadmin -p<password_from_the_previous_step> DATABASE_NAME

Additionally, on Plesk 12.5 or Onyx, you can use the following command to access Plesk database:

plesk db

For Plesk 12.5 and earlier use the following command to get admin password in plain text (you should be connected to the server using SSH/RDP ):

Linux:

# /usr/local/psa/bin/admin --show-password

Windows:

"%plesk_bin%\\plesksrvclient" -get

Have more questions? Submit a request
Please sign in to leave a comment.