忘记 root 密码:
(1)配置文件加:skip-grant-tables
(2)/etc/init.d/mysql restart
(3)root 登陆修改密码
UPDATE user SET authentication_string=PASSWORD('xxx') WHERE user='root' AND host='localhost';
FLUSH PRIVILEGES;
(4)删除配置文件中的 skip-grant-tables
(5)/etc/init.d/mysql restart
网友评论