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)
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)