解决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 是无法给远程连接的用 ...
随机推荐
- 单页应用 - Token 验证
单页应用 - Token 验证 转:https://juejin.im/post/58da720b570c350058ecd40f 第一次接触单页应用,记录公司项目关于Token验证知识. Token ...
- linux学习笔记整理(六)
第七章 Centos7-文件权限管理本节所讲内容:7.1文件的基本权限:r w x (UGO)7.2文件的特殊权限:suid sgid sticky和文件扩展权限ACL7.3实战:创建一个让root都 ...
- Vim怎么批量处理文件将tab变为space
:%s/\t/ /g https://zhidao.baidu.com/question/563849372716100364.html
- @RequestParam 和@RequestBody 的区别?
@RequestParam用来接收: 1 用来处理简单的参数绑定 2 用来接收 Content-Type 是 application/x-www-form-urlencoded (这种格 式的数据 ...
- tomcat 设置虚拟路径的4种方法
通常使用方法1或者方法2 方法1 (添加配置文件):推荐使用,不需要重启服务器 在Tomcat根目录下的/conf/Catalina/localhost/ 路径下新建一个filename.xml,并 ...
- Quartz 的DisallowConcurrentExecution
DisallowConcurrentExecution注解是指:一个JobKey对应的JobDetail实例不运行并发执行,而不是说你继承Job之后的子类不允许并发执行.
- (四)surging 微服务框架使用系列之网关 转载
一.什么是API网关 API网关是一个服务器,是系统对外的唯一入口.API网关封装了系统内部架构,为每个客户端提供一个定制的API.API网关方式的核心要点是,所有的客户端和消费端都通过统一的网关接入 ...
- CF341D Iahub and Xors
CF341D Iahub and Xors 给定一个 \(n\times n\) 的矩阵,平面异或,求平面异或和 \((n\leq10^3,\ m\leq10^5)\) 树状数组 这里主要是记录一下板 ...
- springboot获取applicationcontext
使用springboot之前,我们通过ClassPathXmlApplicationContext加载spring xml配置文件来获取applicationcontext,使用springboot后 ...
- mongo固定集合
固定集合:事先创建,大小固定 类型于环形队列,空间不足队列头文件被替换 不能手动删除文档,只能自动替换 db.ceateCollection("COLLECTION_NAME",{ ...