Host is not allowed to connect to this MySQL server解决方法
来源:互联网 发布:淘宝商品优惠券 编辑:程序博客网 时间:2024/06/14 23:34
今天在Linux上面装完MySQL,却发现在本地登录可以,但是远程登录却报错
Host is not allowed to connect to this mysql server
,找了半天试了网上的一些方法都没有解决,最终在一篇文章里找到了解决方法,特意记录一下。
先说说这个错误,其实就是我们的MySQL不允许远程登录,所以远程登录失败了,解决方法如下:
- 在装有MySQL的机器上登录MySQL mysql -u root -p密码
- 执行
use mysql;
- 执行
update user set host = '%' where user = 'root';
这一句执行完可能会报错,不用管它。 执行
FLUSH PRIVILEGES;
经过上面4步,就可以解决这个问题了。
注: 第四步是刷新MySQL的权限相关表,一定不要忘了,我第一次的时候没有执行第四步,结果一直不成功,最后才找到这个原因。
阅读全文
0 0
- host is not allowed to connect to this MySQL server
- Host is not allowed to connect to this MySQL server
- host ... is not allowed to connect to this MySql server
- Host * is not allowed to connect to this MySQL server
- host is not allowed to connect to this MySql server
- Host is not allowed to connect to this MySQL server
- host ... is not allowed to connect to this MySql server
- Host '***' is not allowed to connect to this MySQL server"
- host ... is not allowed to connect to this MySql server
- Host is not allowed to connect to this mysql server,
- Host '***' is not allowed to connect to this MySQL server
- mysql host is not allowed to connect to this mysql server 解决方法
- mysql 远程访问不行解决方法 Host is not allowed to connect to this MySQL server
- Host 'XXX' is not allowed to connect to this MySQL server 解决方法/开启MySQL远程账号
- mysql 远程访问不行解决方法,Host '' is not allowed to connect to this MySQL server
- mysql远程连接报错: Host * is not allowed to connect to this MySQL server,解决方法
- mysql 远程访问不行解决方法 Host is not allowed to connect to this MySQL server
- mysql 远程访问不行解决方法 Host is not allowed to connect to this MySQL server
- Spring使用Java类定义Bean信息
- fork调用
- 你不知道的产品分析法则
- 【笔记】PackageManager获取App基本信息实现Apk导出、分享、卸载
- UVa 10474 where is marble?
- Host is not allowed to connect to this MySQL server解决方法
- php对xml的XPath操作
- java学习(9) 匿名内部类
- 树状数组 区间修改区间求和总结
- Qt 调用 Windows 接口实现窗口置顶
- 开灯问题
- 四个Fragment相互切换界面,底部几个TextView点击切换相互切换界面
- 用git上传代码代码到github仓库
- 范数-简介