Access denied for user 'root'@'localhost' (using password: YES)解决方案
来源:互联网 发布:windows下的脚本语言 编辑:程序博客网 时间:2024/04/19 19:15
这个问题困扰了我好几次,前几次出现这个问题,第二天莫名奇妙的就好了,现在我终于忍不了了,总的来说是权限问题,好了废话不多说,直接上解决方案:
- 在mysql的配置文件中添加skip-grant-tables(跳过密码直接进入mysql)
- 重启mysql:service mysqld restart
- 免密码进入mysql:mysql -uroot -p
password:(直接回车) 给所有用户添加权限
mysql> set global read_only=0;//(关掉新主库的只读属性)
mysql>flush privileges;
mysql>set global read_only=1;//(读写属性)
mysql>flush privileges;
mysql>grant all privileges on . to ‘root’@’%’ identified by ‘root’ with grant option;
关键词解释:
‘root’@‘%’:是用户
‘root’:是密码在mysql的配置文件中屏蔽掉skip-grant-tables
- 重启mysql:service mysqld restart
阅读全文
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
- 客户端检测
- html 表单
- clk_get函数介绍
- QT 线程之 QtConcurrent::run()
- LeetCode||62. Unique Paths
- Access denied for user 'root'@'localhost' (using password: YES)解决方案
- 在iframe中,地址完全正确,但却跳转不过去
- OpenCV 图片与视频的相互转换
- 单例模式常用的两种写法
- hello.c
- “应用程序无法启动,因为应用程序的并行配置不正确。有关详细信息,请参阅应用程序事件日志,或使用命令行 sxstrace.exe 工具” 的解决方法
- 导出excel,id参数太长解决方案
- 欢迎使用CSDN-markdown编辑器
- 【问题】warning C4996: 'scanf': This function or variable may be unsafe