mysql登录错误
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: YES)'
无法修改密码
用 service mysqld stop
mysqld_safe --skip-grant-tables &
输入 mysql -uroot -p 回车进入
>use mysql;
> update user set password=PASSWORD("newpass")whereuser="root";
更改密码为 newpassord
> flush privileges; 更新权限
grant all on *.* to 用户名@"%"identified by "密码";
flush privileges;
> quit 退出
service mysqld restart
mysql -uroot -p新密码进入
本文转自 穿越防火墙 51CTO博客,原文链接:http://blog.51cto.com/sjitwant/1692158