Mysql Plesk & user admin: message to self

Pffff.. if you change the password for the user admin and store it, plesk cannot connect to the database anymore.
The issue is that the password needed must be the ‘encrypted’ password, rather than the plain text .. Ugh ..

enable the my.cnf and enable skip_grant_tables=1, than stop mysql, and restart when the skip_grant_tables=1 is enabled. Login with mysql -u
than use the following command:
update mysql.user set password=password(‘password taken from the .psa.shadow file’) where user=’admin’;
this must be the encrypted!! password. You can find the encrypted password from the file: cat /etc/psa/.psa.shadow this is the encrypted password and this one is needed to login as admin to mysql from the shell.
you need to disable the skip_grant_tables=1 again and stop / start the mysql server again.
to login from shell: mysql -uadmin -p`cat /etc/psa/.psa.shadow` -D psa

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.