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. 第二天(1)声明式验证之使用验证框架验证域模型和ModelDriven验证

    有一类特殊的属性,即这个属性的类型是另外一个JavaBean,如有一个User类,代码如下: package data; public class User { private String name ...

  2. Android_微信_设置

    减少 内存的使用 (http://news.ifeng.com/a/20170716/51440541_0.shtml) 1.关闭“附近的人” 打开微信,依次点击[我]—[设置]—[通用]—[功能], ...

  3. CSS3特殊图形制作

    CSS3特殊图形制作 现在IE8+的浏览器都支持CSS3+HTML5了,IE8及以下的浏览器的浏览器也快告一段落了,大前端的时代来了.废话不多说,现在开始用CSS3画图 1.心型 //HTML < ...

  4. thinkphp3.2新部署是错

    下载好thinkphp3.2,使用M或者D方法是,报FILE: tp\ThinkPHP\Library\Think\Db.class.php LINE: 42 可能的错误是,配置文件中没有配置数据库连 ...

  5. 分享知识-快乐自己:Struts2 前台日期到后台的日期格式转换

    案例目录: 关键代码展示: DateConverter: package com.mlq.util; import com.opensymphony.xwork2.conversion.TypeCon ...

  6. php mysqli_get_server_version()函数

    php mysqli_get_server_version()函数以整数形式返回MySQL服务器版本. 本文章想大家介绍mysqli_get_server_version 函数的基本使用方法和实例,需 ...

  7. Json解析方式

    http://blog.sina.com.cn/s/blog_628cc2b70101dydc.html

  8. 转载 解决Android与服务器交互大容量数据问题

    对于目前的状况来说,移动终端的网络状况没有PC网络状况那么理想.在一个Android应用中,如果需要接收来自服务器的大容量数据,那么就不得不考虑客户的流量问题.本文根据笔者的一个项目实战经验出发,解决 ...

  9. Handler的另外一种用法(HandlerThread)

    直接上代码: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Handler ...

  10. python suds 调用webservice 缓存

    在linux系统中 如果webservice更新了字段 suds调用有可能缓存以前的字段或方法,对新的字段报找不到类型 TypeNotFound,或者对 新加的方法找不到该方法的错误. 当更新或添加w ...