How to access MySQL as root user in Parallels Plesk linux

by Lanh on December 13, 2011

Plesk Linux

Parallels does a silly thing by renaming ‘root’ mysql account to ‘admin’ when their Panel 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 Parallels Plesk Panel.

On server with Parallels Plesk Panel versions 8.x, 9.x and above admin password is stored in file /etc/psa/.psa.shadow. Use the following command to get the password:

cat /etc/psa/.psa.shadow

Since version 10 admin password stored in file /etc/psa/.psa.shadow is encrypted. Use the following command to get admin password in plain text:

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

On any version of plesk you can use the following command to login to mysql with root privileges:

mysql -uadmin -p`cat /etc/psa/.psa.shadow`

Leave your comment

Required.

Required. Not published.

If you have one.