• 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
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

Restoring MySQL Password Problem

blue22

New Pleskian
Hi Forum,

I've reset the admin password for the mysql server by hand (skip-grant-tables and then updated it). After I realised my error, I used the two default ways from the plesk tutorials to reset the password so plesk can read it again, sadly without any luck :(

== Starting / Stopping psa

So I cant get plesk to start again:

root@server:~$ /etc/init.d/psa start
Starting xinetd service... done
Starting mysql service... done
Trying to connect to MySQL...
Trying to connect to MySQL... Failed to connect to MySQL: ERROR 1045 (28000): Access denied for user 'admin'@'localhost' (using password: YES)
Refusing to reset instance-specific data.


I followed the following two official plesk guides without success :( Hope you can help!



== Plesk Tutorial http://kb.odin.com/en/112492

root@server:~$ mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa
ERROR 1045 (28000): Access denied for user 'admin'@'localhost' (using
password: YES)

root@server:~$ service mysql stop (checked via `ps aux | grep -i sql`, mysql was gone)

root@server:~$ mysqld_safe --skip-grant-tables &

root@server:~$ cat /etc/psa/.psa.shadow
$AES-128-CBCfd$o5Pnkg+rDbckljlklCrw==$8Brgdfasfs+dqbdfdffdcw==

(why does the guide tell to use the 'psa' database if then the 'mysql' database is updated?)
root@server:~$ mysql -u admin psa

mysql> UPDATE mysql.user SET
Password=PASSWORD('$AES-128-CBCfd$o5Pnkg+rDbckljlklCrw==$8Brgdfasfs+dqbdfdffdcw==')
WHERE User='admin';
Query OK, 1 row affected (0.02 sec)
Rows matched: 1 Changed: 1 Warnings: 0

root@server:~$ /etc/init.d/mysql stop
* Stopping MySQL database server mysqld

150203 22:32:01 mysqld_safe mysqld from pid file
/var/run/mysqld/mysqld.pid ended
[ OK ]
[1]+ Done mysqld_safe --skip-grant-tables

root@server:~$ service mysql start (this works)

root@server:~$ /usr/local/psa/bin/admin --show-password
p4ssw0rd
root@server:~$ export PSA_PASSWORD='p4ssw0rd'
root@server:~$ /usr/local/psa/admin/bin/ch_admin_passwd
ERROR 1045 (28000): Access denied for user 'admin'@'localhost' (using
password: YES)

root@server:~$ mysql -uadmin -p`cat /etc/psa/.psa.shadow`
mysql>



== Plesk Tutorial http://kb.odin.com/en/116916

root@server:~$ mysql -uadmin -p`cat /etc/psa/.psa.shadow` mysql

mysql> GRANT GRANT OPTION ON *.* TO 'admin'@'localhost' WITH GRANT OPTION;
Query OK, 0 rows affected (0.00 sec)
(Nothing changed, so it wasnt a problem with grant)
 
Back
Top