Reset Mysql Password in Plesk
Following are the steps to reset the Mysql password in Plesk:
1) Login to the Server and load MySQL with the 'skip-grant-tables' in /etc/my.cnf like below.
[mysqld]
default-character-set=latin1
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
set-variable=max_connections=500
skip-grant-tables
2) Log on the MySQL server and set an empty password for root.
[root@support root]# mysql
mysql>FLUSH PRIVILEGES;
mysql>GRANT ALL PRIVILEGES ON *.* TO root@localhost IDENTIFIED BY 'new password' WITH GRANT OPTION;
mysql>FLUSH PRIVILEGES;
mysql>\q
3) Comment out or remove string 'skip-grant-tables' like below.
[mysqld]
default-character-set=latin1
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
set-variable=max_connections=500
#skip-grant-tables
4) Then restart mysqld service with command
/sbin/service mysqld restart
|