Reset mật khẩu MySQL trong CentOS

mysql_password

service mysql stop
sudo mysqld_safe --skip-grant-tables &
mysql -u root
use mysql;
update user set password=PASSWORD("PUT_A_NEW_PASSWD_HERE") where User='root';
flush privileges;
exit
service mysql stop
service mysql start
Dương Triều Blog © 2016