• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved Resetting the mysql admin password

Franco

Regular Pleskian
Hello,
I am trying to do the same as described in here Resolved - Changing root/MySQL passwords as I seem to have lost the mysql admin password or perhaps never had it somehow.
I can login using 'Plesk db', but when I try and change the password (step 2) I get:

ERROR 1146 (42S02): Table 'psa.user' doesn't exist

I get this sort of prompt when logged in: MariaDB [psa]> (instead of [none])
What I am doing wrong?
I am on Pleask Onyx and CentOS 7.4

Regards
Franco
 
Hi Igor,
it is my understanding that the Plesk username/password is not the same as the mysql's and that document talsk about Plesk account only, or am I wrong?
 
All right, I then successfully reset the admin password as per instructions. Still, I cannot login except via 'Plesk db'.
My initial intention was to run a global mysqlcheck (instead of going through the Plesk UI database verification one by one) and there's no way I can get to mysqlcheck :(

Here is my command:
# mysqlcheck -c -u admin -p --all-databases
Enter password:
mysqlcheck: Got error: 1045: Access denied for user 'admin'@'localhost' (using password: YES) when trying to connect

Whether I try with or without password I cannot go through...
Of course, i tried root as well, but in any case when in with 'Plesk db' I can see the current user being admin@localhost. also confirmed by the Plesk panel.

Any further suggestion, please?
 
Hi Franco,

instead of
mysqlcheck -c -u admin -p --all-databases
... pls use:
Code:
mysqlcheck -uadmin -p`cat /etc/psa/.psa.shadow` --all-databases


Pls. note, that the command "plesk db" is an equivalent to:
Code:
mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa

If you experience issues/errors/problems when using "p`cat /etc/psa/.psa.shadow`" within a MySQL command over your command line, it is most likely the case, that the stored hash password might be incorrect. You could check this with for example ( logged in as user "root" over SSH ):
Code:
cat /etc/psa/.psa.shadow
followed by:
Code:
mysql -uadmin -p"\\$AES-128-CBC\\$==\\$XXXxxxXXXxxxXXX==" psa
( Pls. note the "\\", to escape the system symbols within your command! )


Pls. correct a possible old password hash with the help of:



In addition, pls. consider to use the help of the official Plesk support, in case that you are unable to change your Plesk password correctly. Experienced system engineers and highly skilled system administrators will help you to solve your issue/error/problem directly on your server. ;)

 
Thanks! the command
# mysqlcheck -uadmin -p`cat /etc/psa/.psa.shadow` --all-databases
worked fine :)

For the rest I will dig later.
 
Back
Top