首先停止mysql服务
service mysqld stop
以跳过授权的方式启动mysql
mysqld_safe --skip-grant-tables &
以root用户登录mysql
mysql -u root
操作mysql库的user表,进行update
mysql> use mysql;
mysql> update user set password=password('654321') where user='root' and host='localhost';
mysql> flush privileges;
mysql> quit
重启mysql服务
service mysqld restart

1298

被折叠的 条评论
为什么被折叠?



