Author Topic: mysql script mysql_pwd_reset doesn't work  (Read 2270 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
mysql script mysql_pwd_reset doesn't work
« on: June 05, 2021, 09:42:47 PM »
Password get changed in /root/my.conf and /usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php but then there is no change in mysql database
It's done with

systemctl stop mysqld
systemctl set-environment MYSQLD_OPTS="--skip-grant-tables"
systemctl start mysqld
mysql -u root
mysql> UPDATE mysql.user SET authentication_string = PASSWORD('MyNewPassword') WHERE User = 'root' AND Host = 'localhost';
mysql> FLUSH PRIVILEGES;
mysql> quit
systemctl stop mysqld
systemctl unset-environment MYSQLD_OPTS
systemctl start mysqld
mysql -u root -p