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

  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. QT 按键处理 快捷键处理 shift + ctrl

    原味地址:http://www.cnblogs.com/codingmylife/archive/2010/08/30/1812739.html CTRL+Enter发送信息的实现 在现在的即时聊天程 ...

  2. AdobeFlashPlayer.资料

    1.chrome 设置 chrome-->设置-->高级-->内容设置-->Flash 2. 3. 4. 5.

  3. tkinter窗口系列之一——列表框

    以下内容来自https://tkdocs.com/tutorial/morewidgets.html 一个列表框显示由单行文本所组成的一栏条目,通常它很冗长,它允许使用者通过列表浏览其中的内容,选择一 ...

  4. cocos2d-x3.0rc打包apk遇到的一些问题记录

    下载cocos2d-x3.0rc后根据官方教程进行环境配置等等一系列过程没有遇到什么问题 打包apk时出现一些问题: 按照官方教程cmd下运行cocos run -p android -m relea ...

  5. js 判断滚动条的滚动方向

    以下代码实现判断页面的滚动条的滚动方向: var sign = 80;//定义默认的向上滚与向下滚的边界 window.onscroll = window.onresize = function(){ ...

  6. CDN存储和加速静态文件是什么回事(整理)(CDN是什么)

    CDN存储和加速静态文件是什么回事(整理)(CDN是什么) 一.总结 一句话总结: 内容分发网络:Content Delivery Network:依靠网络中的各个节点,就近发放静态资源. CDN的全 ...

  7. 一个基于特征向量的近似网页去重算法——term用SVM人工提取训练,基于term的特征向量,倒排索引查询相似文档,同时利用cos计算相似度

    摘  要  在搜索引擎的检索结果页面中,用户经常会得到内容相似的重复页面,它们中大多是由于网站之间转载造成的.为提高检索效率和用户满意度,提出一种基于特征向量的大规模中文近似网页检测算法DDW(Det ...

  8. Oracle学习笔记_05_分组函数

    组函数:avg  sum  max  min   count group by having group by 增强:rollup      cube     grouping      groupi ...

  9. JVM的性能跳优

    首先需要找到需要进行调优的进程. 通过jps -v -l -m 找到我需要调优的进程 其中, -m表示输出传入main方法的参数, -l表示输出的main类或jar包的名字, -v表示传入JVM的参数 ...

  10. listen and translation exercise 49

    Huh? Appears to Be Universally Understood What's the most universal utterance in languages across th ...