Access denied for user 'root'@'localhost' (using password: YES)解决方案
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了Access denied for user 'root'@'localhost' (using password: YES)解决方案,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含1022字,纯文字阅读大概需要2分钟。
内容图文
![Access denied for user 'root'@'localhost' (using password: YES)解决方案](/upload/InfoBanner/zyjiaocheng/489/ce44c4522f4a49ddac5279c1f80e0220.jpg)
想进入数据库,发现进不了,报错Access denied for user ‘root‘@‘localhost‘ (using password: YES)
试了很多方法都不行,后来还是解决了
解决方法:
1.先停止mysql
shell># service mysqld stop
2.这段代码的意思大概是在启动
mysql时不启动grant-tables,授权表
shell># mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
3.进入mysql
shell》# mysql -uroot mysql
4.查看数据库,是否存在mysql数据库并选择mysql数据库
mysql> show databases
mysql> use mysql
5.删除user为空的数据
mysql> delete from user where user=‘‘;
6.重设密码
mysql> update user set Password=PASSWORD(‘你想要设置的密码‘) where user=‘root‘;
7.刷新权限
mysql> flush privileges;
8.退出
mysql> exit;
9.重启mysql
shell># service mysqld restart
10.测试,搞定!
Access denied for user 'root'@'localhost' (using password: YES)解决方案
标签:start star date 存在 table 测试 设置 data top
本文系统来源:http://www.cnblogs.com/blibli/p/7292114.html
内容总结
以上是互联网集市为您收集整理的Access denied for user 'root'@'localhost' (using password: YES)解决方案全部内容,希望文章能够帮你解决Access denied for user 'root'@'localhost' (using password: YES)解决方案所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。