Access denied for user 'root'@'localhost' (using password:YES) 解决方案
来源:互联网 发布:win8数据恢复 编辑:程序博客网 时间:2024/03/28 17:00
解决方案:
1、打开MySQL目录下的my.ini文件,在文件的最后添加一行“skip-grant-tables”,保存并关闭文件。
2、重启MySQL服务。
3、在命令行中输入“mysql -uroot -p”(不输入密码),回车即可进入数据库。
4、执行,“use mysql;”使用mysql数据库。
5、执行,“update user set password=PASSWORD("rootadmin") where user='root';”(修改root的密码)
(期间我还select下user表中的记录,查询全部的时候显示了一些乱码,然后我只查询了user表中的Host、User、Password字段,貌似当时显示了3条记录,有1个没有名称。当然,为了解决问题,这些我也管不了了。)
6、打开MySQL目录下的my.ini文件,删除最后一行的“skip-grant-tables”,保存并关闭文件。
7、重启MySQL服务。
8、在命令行中输入“mysql -uroot -prootadmin”,问题搞定!
0 0
- Access denied for user 'root'@'localhost' (using password:YES) 解决方案
- Access denied for user 'root'@'localhost' (using password:YES) 解决方案
- Access denied for user 'root'@'localhost' (using password:YES) 解决方案
- Access denied for user 'root'@'localhost' (using password:YES) 解决方案
- Access denied for user 'root'@'localhost' (using password:YES) 解决方案
- Access denied for user 'root'@'localhost' (using password:YES) 解决方案
- Access denied for user 'root'@'localhost' (using password:YES) 解决方案
- Access denied for user 'root'@'localhost' (using password:YES) 解决方案
- access denied for user 'root'@'localhost'(using password:YES)解决方案
- Access denied for user 'root'@'localhost' (using password:YES) 解决方案
- Access denied for user 'root'@'localhost' (using password:YES) 解决方案
- Access denied for user 'root'@'localhost' (using password: YES)解决方案
- Access denied for user 'root'@'localhost' (using password:YES) 解决方案
- #1045 - Access denied for user 'root'@'localhost' (using password: YES)
- Access denied for user 'root'@'localhost' (using password: YES) 问题解决
- 解决'Access denied for user 'root'@'localhost' (using password: YES)'
- access denied for user 'root'@'localhost' using password yes
- access denied for user 'root'@'localhost' using password yes
- maven+springMVC+mybatis+junit详细搭建过程
- Qt on Android:应用截屏
- IRF与TRILL——构建无生成树协议的数据中心二层网络
- SQLiteDatabase是一直打开好,还是每次使用都打开再关闭好?
- vvvv
- Access denied for user 'root'@'localhost' (using password:YES) 解决方案
- Struts2之拦截器
- ubuntu中工具以及环境整合
- Android一些经典的开源项目
- 设计模式(三):组合模式
- AIX服务器上设置IIB连接oracle
- JAVA POI 生成EXCEL 通用代码
- 三极管何时工作在饱和状态
- c#对Aspose.Word替换书签内容的简单封装