解决ERROR 1130: Host '192.168.11.1' is not allowed to connect to this MySQL
使用navicat进行远程登录MySQL时,报出
ERROR 1130: Host '192.168.11.1' is not allowed to connect to this MySQL server
解决方法:需要修改mysql数据库下的user表user=root的host字段的值,将localhost改为%
首先在mysql安装机器上登录mysql,
>>提君博客原创 http://www.cnblogs.com/tijun/ <<
然后切换到mysql 数据库下
mysql> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A Database changed
可以看一下此库下都有那些数据库表
mysql> show tables
-> ;
+---------------------------+
| Tables_in_mysql |
+---------------------------+
| columns_priv |
| db |
| event |
| func |
| general_log |
| help_category |
| help_keyword |
| help_relation |
| help_topic |
| host |
| ndb_binlog_index |
| plugin |
| proc |
| procs_priv |
| servers |
| slow_log |
| tables_priv |
| time_zone |
| time_zone_leap_second |
| time_zone_name |
| time_zone_transition |
| time_zone_transition_type |
| user |
+---------------------------+
rows in set (0.00 sec)
查看user表中的内容
mysql> select host,user from user;
+------------+------+
| host | user |
+------------+------+
| 127.0.0.1 | root |
| localhost | |
| localhost | root |
| ltt5.bg.cn | |
| ltt5.bg.cn | root |
+------------+------+
rows in set (0.00 sec)
这里就可以看到,root用户目前只允许在localhost下登录
修改
mysql> update user set host = '%' where user = 'root';
ERROR (): Duplicate entry '%-root' for key 'PRIMARY'
mysql> flush privileges;
Query OK, rows affected (0.00 sec)
中间会报出一个ERROR 1062 (23000): Duplicate entry '%-root' for key 'PRIMARY'
不用管,执行flush privileges;即可
再次查询user表
mysql> select host,user from user;
+------------+------+
| host | user |
+------------+------+
| % | root |
| 127.0.0.1 | root |
| localhost | |
| ltt5.bg.cn | |
| ltt5.bg.cn | root |
+------------+------+
rows in set (0.00 sec)
到这里,你可以在navicat上再次连接mysql,就可以成功了。
>>提君博客原创 http://www.cnblogs.com/tijun/ <<
解决ERROR 1130: Host '192.168.11.1' is not allowed to connect to this MySQL的更多相关文章
- SQL Error (1130): Host '192.168.1.126' is not allowed to connect to this MySQL server
通过HeidiSQL连接MYSQL数据库报错: SQL Error (1130): Host '192.168.1.126' is not allowed to connect to this MyS ...
- 通过navicat连接mysql服务器提示SQL Error (1130): Host '192.168.1.100' is not allowed to connect to this MySQL server
新装一个mysql,尝试用通过navicat连接mysql服务器的时候提示: SQL Error (1130): Host '192.168.1.100' is not allowed to conn ...
- Mysql远程连接报错:SQL Error (1130): Host '192.168.61.128' is not allowed to connect to this MySQL server
Mysql远程连接报错:SQL Error (1130): Host '192.168.0.18' is not allowed to connect to this MySQL server ...
- Mysql远程连接报错:SQL Error (1130): Host '192.168.6.128' is not allowed to connect to this MySQL server
通过SQLyog连接linux中的MySQL报错问题:SQL Error (1130): Host '192.168.6.128' is not allowed to connect to this ...
- ERROR 1130: Host '192.168.1.3' is not allowed to connect to this MySQL ERROR 1062 (23000): Duplicate entry '%-root' for key 'PRIMARY'
use mysql mysql> select host, user from user; 将相应用户数据表中的host字段改成'%': update user set host='%' whe ...
- ERROR 1130 (HY000): Host '192.168.20.165' is not allowed to connect to this MySQL server
问题 远程连接mysql时遇到如下问题: ERROR 1130 (HY000): Host '192.168.20.165' is not allowed to connect to this MyS ...
- MYSQL错误1130:ERROR 1130: Host 10.10.36.115 is not allowed to connect to this MySQL server
解决远程连接mysql错误1130代码的方法 在用远程连接Mysql服务器的数据库,不管怎么弄都是连接不到,错误代码是1130,ERROR 1130: Host 10.10.36.115 is no ...
- 报错 "Host '192.168.209.1' is not allowed to connect to this MySQL server"
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明.本文链接:https://blog.csdn.net/weixin_37632381/artic ...
- 错误代码是1130,ERROR 1130: Host xxx.xxx.xxx.xxx is not allowed to connect to this MySQL server 是无法给远程连接的用户权限问题
错误代码是1130,ERROR 1130: Host xxx.xxx.xxx.xxx is not allowed to connect to this MySQL server 是无法给远程连接的用 ...
随机推荐
- 【CQOI2006】凸多边形
1713 -- [CQOI2006]凸多边形 Description 逆时针给出n个凸多边形的顶点坐标,求它们交的面积.例如n=2时,两个凸多边形如下图: 则相交部分的面积为5.233. Input ...
- Django-rest-framework 接口实现 了解 GenericAPIView
进化写法GenericAPIView 面向对象的封装 将同样的 方法以及对象 封装到一起 将 对数据库相关的 功能封装到一起 GenericAPIView 在 from rest_framework. ...
- 6.oop-类和对象
一.如何抽象对象1.创建一个类2.给该描述属性 属性就是java中所有的数据类型3.给该类定义行为方法 方法的签名是:public void 方法名(){方法体} 公共的 无返回类型 二.如何使用类和 ...
- (四)JavaScript 注释
JavaScript 不会执行注释. 我们可以添加注释来对 JavaScript 进行解释,或者提高代码的可读性. 单行注释以 // 开头. 本例用单行注释来解释代码: JavaScript 多行注释 ...
- ROS 创建服务和请求
教程 维基 http://wiki.ros.org/cn/ROS/Tutorials 快速过程 创建包 $ cd ~/catkin_ws $ mkdir ~/catkin_ws/src $ cd ~/ ...
- ActiveMQ的queue以及topic两种消息处理机制分析
1 queue与topic的技术特点对比 对比项 Topic Queue 概要 Publish Subscribe messaging 发布订阅消息 Point-to-Point 点对点 有无状 ...
- 深度学习框架PyTorch一书的学习-第三章-Tensor和autograd-1-Tensor
参考https://github.com/chenyuntc/pytorch-book/tree/v1.0 希望大家直接到上面的网址去查看代码,下面是本人的笔记 Tensor Tensor可以是一个数 ...
- ganache与metamask
1.其实ganache其实就相当于一个私有链ganache安装,这个是图形化界面的: 2.(testRpc跟他其实是一个用处,有一个即可,只不过testRpc是非图形化界面.要注意两者都仅运行在內存中 ...
- Oracle数据块深入分析总结
http: 最近在研究块的内部结构,把文档简单整理了一下,和大家分享一下.该篇文章借助dump和BBED对数据 库内部结构进行了分析,最后附加了一个用BBED解决ORA-1200错误的小例子.在总结的 ...
- Generative Adversarial Nets[CycleGAN]
本文来自<Unpaired Image-to-Image Translation using Cycle-Consistent Adversarial Networks>,时间线为2017 ...