• 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

changed admin password in mysql DB now I cant login

C

crankin

Guest
Well after you stop LYAO maybe some one can help.

For some reason, and dont ask me why I changed the admin password in the mysql.user table. Then when I tried to go to my Plesk login screen i got the following message

ERROR: Unable to connect to database: saved admin password is incorrect. 0: /usr/local/psa/admin/auto_prepend/auth.php3:67 psaerror(string "Unable to connect to database: saved admin password is incorrect.")

I took a look at auth.php and it's just byte code it seems. I'm guessing it is cached info on the old password. I was thinking about clearing it, and seeing if that would help but I think I'll just ask the folks here first. Thanks in Advance
 
got the answer

Log on to your dedicated server via SSH with your root username

Stop the MySQL process with the following command:


/etc/init.d/mysqld stop


Restart it without the user information:


/usr/bin/safe_mysqld --skip-grant-tables &


Now you should be able to log in without the root password:


mysql -u root


While you are at the mysql> prompt enter:


UPDATE mysql.user SET Password=PASSWORD('newpwd') WHERE User='admin'; (remember to include the ';' and that newpwd should be the admin password)

and then

FLUSH PRIVILEGES;


I did everything else correctly I just never flushed the privileges that is why i wasn't able to login in even after i changed the password back. So I would just like to thank my self for helping myself out. I really appreciate it.
 
Back
Top