Plesk: how to get root password for MySQL

i have forgotten my mysql root password , am using plesk web panel on linux . so how to get password back ?

thanks

Supporter Asked on September 1, 2016 in Software.
Add Comment
1 Answer(s)
Best answer

first there is no root mysql account with plesk . when plesk is installed it rename root MYSQL account to admin.

for plesk 8.x and 9.x password are store it /etc/psa/.psa.shadow   use this command to get password


# cat /etc/psa/.psa.shadow

in these latest version plesk 10.x admin password store it /etc/psa/.psa.shadow  are highly encrypted so to view password use this command


# /usr/local/psa/bin/admin --show-password              # on Linux
"%plesk_bin%\plesksrvclient" -get            # on Windows

 

also to login to mysql with root privileges use the following command

 

# MYSQL_PWD=cat /etc/psa/.psa.shadow mysql -u admin             # on Linux
"%plesk_dir%\MySQL\bin\mysql" -P8306 -uadmin -p<password_from_the_previous_step> YOUR_DATABASE_NAME              # on Windows

 

Supporter Answered on September 1, 2016.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.