处理方案:

1、先用localhost方式连接到MySQL数据库,然后使用MySQL自带的数据库mysql;

use mysql;

2、执行:select host from user where user = 'root';  发现,host的值就是localhost。

所以将它的值改掉:update user set host='%' where user = 'root';

3、修改完成后,执行:flush privileges;

将修改内容生效,再次配置时,用IP地址或者localhost 就都能正常连接到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> select host from user where user = 'root';

+-----------+

| host      |

+-----------+

| localhost |

+-----------+

1 row in set (0.00 sec)

mysql> update user set host='%' where user = 'root';

Query OK, 1 row affected (0.00 sec)

Rows matched: 1  Changed: 1  Warnings: 0

mysql> select host from user where user = 'root';

+------+

| host |

+------+

| %    |

+------+

1 row in set (0.00 sec)

mysql> flush privileges;

Query OK, 0 rows affected (0.00 sec)

mysql>

连接mysql时报:message from server: "Host '192.168.76.89' is not allowed to connect to this MySQL server的更多相关文章

  1. 连接mysql时报:message from server: "Host '192.168.76.89' is not allowed to connect to this MySQL server 处理方案

    1.先用localhost方式连接到MySQL数据库,然后使用MySQL自带的数据库mysql; use mysql: 2.执行:select host from user where user = ...

  2. java.sql.SQLException: null, message from server: "Host '192.168.xxx.xxx' is not allowed to connect to this MySQL server"

    当你连接自己的电脑上的MySQL时,报这样的错,你可以把ip换成 127.0.0.1或者localhost  ,当然前提是用户名和密码正确

  3. java.sql.SQLException: null, message from server: "Host '192.168.126.100' is not allowed to connect to this MySQL server"

  4. hive报错java.sql.SQLException: null, message from server: "Host '192.168.126.100' is not allowed to connect to this MySQL server"

  5. 报错 "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 ...

  6. 通过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 ...

  7. 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 ...

  8. 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 ...

  9. 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     ...

随机推荐

  1. 什么是Kubernetes?

    刚刚进学校实验室,第一次开会导师和小组同学说了n次Kubernetes,从来没听过,一脸懵逼. Kubernetes也有很多人把它叫K8S, 原文链接:http://omerio.com/2015/1 ...

  2. [转]genymotion Unable to load VirtualBox engine 某种解决办法

    genymotion Unable to load VirtualBox engine 某种解决办法 耳闻genymotion这款模拟器很强力.于是下下来试试看.我的机器上是有virtualbox的了 ...

  3. memcached 笔记之windows 7 下面 安装memcached 报错

    windows 7 下面 安装memcached 报错 两种情况: 一:服务确实已经安装过 .如需要重新安装,当然是先memcached.exe -d uninstall 二:奇怪的是服务确实没有安装 ...

  4. iOS present出一个背景为半透明的试图

    WDKChatRoomViewController *roomVC = [[WDKChatRoomViewController alloc] init]; roomVC.titleStr = [gro ...

  5. wordpress网站后台打开速度很慢解决方法?

    今天就和朋友们分享下,wordpress网站后台最近打开速度很慢的原因及解决方法.推荐第三种方法 方法/步骤   1.安装插件:在插件中搜索 Disable Google Fonts,选择安装,然后启 ...

  6. python学习之-- RabbitMQ 消息队列

    记录:异步网络框架:twisted学习参考:www.cnblogs.com/alex3714/articles/5248247.html RabbitMQ 模块 <消息队列> 先说明:py ...

  7. 牛客网暑期ACM多校训练营(第九场)D

    链接:https://www.nowcoder.com/acm/contest/147/D来源:牛客网 Niuniu likes traveling. Now he will travel on a ...

  8. java-过滤器(Filter)

    在javaweb开发中,项目中都会包含一些过滤器(Filter),主要用于web服务器对资源的管理控制,如静态资源文件.jsp页面访问等.我们可以使用过滤器实现一些特殊的功能,如常见的过滤敏感词汇(替 ...

  9. JAVA实验--统计文章中单词的个数并排序

    分析: 1)要统计单词的个数,就自己的对文章中单词出现的判断的理解来说是:当出现一个非字母的字符的时候,对前面的一部分字符串归结为单词 2)对于最后要判断字母出现的个数这个问题,我认为应该是要用到ma ...

  10. 细说分布式Redis架构设计和踩过的那些坑

    细说分布式Redis架构设计和踩过的那些坑_redis 分布式_ redis 分布式锁_分布式缓存redis 细说分布式Redis架构设计和踩过的那些坑