Reset Plesk “admin” Password MySQL

What happened?!?

When the Plesk "admin" user breaks, the panel breaks. This is often an issue when the "admin" password stored in /etc/psa/.psa.shadow does not match what the "admin" password is in MySQL. Of course, this happens randomly as no one has yet admitted to changing anything (of course).

Steps for Resolution

To reset the password for the "admin" user, use the same steps for resetting the "root" account MySQL password.

1) Stop MySQL: (depending on server config, you may be using "mysqld", "mysql-server", or plain "mysql")

# service mysqld stop

2) Start MySQL in safe mode without grant tables to get straight in and run it in the background:

# /usr/bin/mysqld_safe --skip-grant-tables &

3) Run the following (as root or admin user, depending on situation) to reset the password for the user specified:

# mysql -uadmin -p`cat /etc/psa/.psa.shadow` mysql -e "update user set Password=password('NEWPASSWORD') where User='admin'; flush privileges;"

Of course, replace "admin" or "root" where appropriate and replace "NEWPASSWORD" with the new password.

4) Now go ahead and stop MySQL-safe mode and start MySQL normally:

# service mysqld restart

You may also like...

Leave a Reply

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