How to get MySQL root Password in Linux Plesk?

Plesk MySQL server have no root user. Instead Plesk have user “admin” with root privileges.

You can run the command given below to get MySQL admin user password.

[root@server ~] # cat /etc/psa/.psa.shadow

Verify the password by login to the admin user.

[root@server ~] # mysql -u admin -p3G5wVCxDGotP4itJ
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1234 to server version: 5.1

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.


If you want login to MySQL without entering the password always, go through the following steps.

Create a file, /root/.my.cnf and add the follwong contents in it.

user = admin
password = 3G5wVCxDGotP4itJ

user = admin
password = 3G5wVCxDGotP4itJ

This will allow you to use mysql and mysqldump without providing passwords.