帅东's Blog

When I look back, I will not regret for wasted years, not because of mediocrity and shame

mysql Access denied for user root@localhost错误解决方法总结(转)

手贱改了一些东西mysql报错
error: ‘Access denied for user ‘root’@’localhost’ (using password: NO)’

最后还是谢谢http://www.cnblogs.com/qq78292959/p/3641972.html

/etc/init.d/mysql stop

mysqld_safe –user=mysql –skip-grant-tables –skip-networking &

mysql -u root mysql

mysql> UPDATE user SET Password=PASSWORD(‘newpassword’) where USER=’root’;
mysql> FLUSH PRIVILEGES;
mysql> quit

/etc/init.d/mysql restart

mysql -uroot -p

Enter password: <输入新设的密码newpassword>

阅读更多
文章标签: mysql
个人分类: 常识
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

不良信息举报

mysql Access denied for user root@localhost错误解决方法总结(转)

最多只允许输入30个字

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭