• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

How reset Plesk Admin Password on Plesk 12.5 with CentOS 7

m0rpheu5

Regular Pleskian
Hello guys, i already tried every tutorial in the internet, from Plesk, from Odin, etc etc, when i access the Plesk i got the message:

ERROR: PleskDBException: Unable to connect to database: mysql_connect(): Access denied for user 'admin'@'localhost' (using password: YES) (Error code: 1045) (Abstract.php:69)

i know the right admin password for MySQL and for Plesk, but when i try to use the command :
"mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa" i got "ERROR 1045 (28000): Access denied for user 'admin'@'localhost' (using password: YES)", in this files /etc/psa/.psa.shadow, the password is crypto.

so i put the uncrypto password on /etc/psa/.psa.shadow so the command below works, then i run the command that i saw on Plesk tutorial to reset the admin password.

export PSA_PASSWORD='MYNEWPASSWORD'
/usr/local/psa/admin/bin/ch_admin_passwd

get no error message, so i saw the password on /etc/psa/.psa.shadow get crypto, but i the Plesk continue showing the error message and i continues can´t access the mysql using the crypto password on the .psa.shadow file.

Could anybody help me?

Thanks
 

I tried, this:

Code:
1. run this line, copy the password to some text file:

cat /etc/psa/.psa.shadow

2. vi /etc/my.cnf
i for insert, under [mysqld] add the skip-grant-tables (or skip_grant_tables) option. esc :x! (to get out and save changes)

***3. restart mysql using this line:

systemctl restart mariadb.service

***IMPORTANT*** (and FYI Plesk team!!!) The Plesk 12.5 documentation for CentoOS7 users needs to be updated, because CentoOS7 is running MariaDB and the restart option has CHANGED from previous versions (at least that's what I understood from the CentOS7 forum messages I read)

4. Now you should be able to run the following line to see the incorrect password set up for admin:

mysql -uadmin -p`cat /etc/psa/.psa.shadow` mysql -Ne"select * from user where User='admin';"

5. Reset it to the password you pasted, the correct one:

mysql -uadmin -p`cat /etc/psa/.psa.shadow` mysql -Ne"update user set Password=PASSWORD('$AES-128-....==') where User='admin';"

6. Refresh browser to see you can now login again to Plesk.

but what i need to put in this line "mysql -uadmin -p`cat /etc/psa/.psa.shadow` mysql -Ne"update user set Password=PASSWORD('$AES-128-....==') where User='admin';"" into the PASSWORD ('$AES-128-....==") i need to put the content from /etc/psa/.psa.shadow??

the problem that i know the right password, but if i try to use "mysql -uadmin -p`cat /etc/psa/.psa.shadow`", i got the wrong password error, i think this is the problem.

Thanks
 
Back
Top