在使用MySQL-Front连接mysql的时候发生的这个错误

ERROR 1130: Host xxx is not allowed to connect to this MySQL server

更改 mysql 数据库里的 user表里的 host项
localhost改称%

mysql -u root -p

mysql>use mysql;

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

  经过实际测试,有些情况下执行这条语句会报下面的错误:

  ERROR 1062 (23000): Duplicate entry ‘%-root’ for key ‘PRIMARY’

  改成这样的就可以执行了

  update user set host=’%’ where user=’root’ and host=’localhost’;

mysql>flush privileges;

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

现在就可以连接了!

  权限

    GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' with grant option;

ERROR 1130: Host xxx is not allowed to connect to this MySQL server的更多相关文章

  1. 连接远程数据库时出现 SSH: expected key exchange group packet from server / 2003 - Can't connect to MySQL server on 'XXX' (10038) / 1130 - Host 'XXX' is not allowed to connect to this MySQL server

    昨天在自己的远程服务器上玩,把系统重装了.新装了MySQL,在本地用navicat连接的时候出了几个小问题. 问题一:SSH: expected key exchange group packet f ...

  2. ERROR 1130: Host 'XXXXXXX' is not allowed to connect to this MySQL server

    解决方法:1. 改表法.可能是你的帐号不允许从远程登陆,只能在localhost.这个时候只要在localhost的那台电脑,登入mysql后,更改 "mysql" 数据库里的 & ...

  3. 解决MySql报错:1130 - Host 'xxx' is not allowed to connect to this MySQL server的方法

    发现问题 使用Navicat连接MySql数据库时,未能成功,提示信息如下图: 这个错误提示已经很明确了,"不允许主机'desktop-teat9ob'连接到此mysql服务器", ...

  4. 错误号码1130:Host 'XXX' is not allowed to connect to this MySQL server

    今天在linux机器上装了一个mysql,想通过sqlyog远程连接过去,发生了:错误号码1130:Host 'XXX' is not allowed to connect to this MySQL ...

  5. 远程连接mysql报错【1130 -host 'localhost' is not allowed to connect to this mysql server】

    远程连接mysql时包如下错误: 1130 -host 'localhost' is not allowed to connect to this mysql server 解决办法 本地用root账 ...

  6. 解决服务器连接错误Host ‘XXX’ is not allowed to connect to this MySQL server

    这段时间在研究火车头的入库教程,在“配置登陆信息和数据库(mysql)”连接中,出现“服务器连接错误Host 'XXX' is not allowed to connect to this MySQL ...

  7. Host 'xxx' is not allowed to connect to this MySQL server.

    mysql开启远程连接 今天在服务器安装了mysql,准备用mysqlguitools远程登录的时候出错,提示:Host 'xxx' is not allowed to connect to this ...

  8. mysql报错:1130 -host 'localhost' is not allowed to connect to this mysql server

    错误提示:1130 -host 'localhost' is not allowed to connect to this mysql server 原因:手贱把mysql数据库系统中mysql数据库 ...

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

    java.sql.SQLException: null,  message from server: "Host 'xxx' is not allowed to connect to thi ...

随机推荐

  1. session什么时候被创建

    一个常见的错误是以为 session 在有客户端访问时就被创建,然而事实是直到某 server 端程序(如 Servlet )调用HttpServletRequest.getSession(true) ...

  2. IOS发展--他们控制的定义

    有没有这样的要求,,自定义panel,里面放几个控件,在多个页面中使用此panel. 有三个观点来解决这个问题: 1.自己继承UIView写一个类,在它是在代码的形式加入需要控制.完成布局. 2.使用 ...

  3. ZooKeeper 主要的操作演示样品

    // 创建一个与server的连接 ZooKeeper zk = new ZooKeeper("localhost:" + CLIENT_PORT, ClientBase.CONN ...

  4. windows下 composer常见问题及处理

    错误一: Warning: This development build of composer is over 30 days old. It is recommend ed to update i ...

  5. Apache无法启动解决 the requested operation has failed

    Apache不能启动解决办法 原因一:80端口占用例如IIS,另外就是迅雷. 原因二:软件冲突装了某些软件会使apache无法启动如Dr.com 你打开网络连接->TcpIp属性->高级- ...

  6. HTML5----input-datalist输入框自己主动提示功能

    效果图: <label for="word_name">字母 : </label> <input id="word_name" n ...

  7. swift 笔记 (二十) —— 泛型

    泛型 泛型是为了解决在针对不同数据类型.而做了同一种功能的操作导致的每一个类型我们都要写一份代码的问题. 有了泛型,我们能够仅仅写一份逻辑代码,而适应于不同的数据类型. func swapInt(in ...

  8. Thrift学习

    Thrift学习 一:thrift介绍 Thrift是facebook开发的用来处理各不同系统之间数据通讯的rpc服务框架,后来成为apche的开源项目.thrift支持多种程序语言,包括Java,P ...

  9. leetcode第36题--Sudoku Solver

    题目: Write a program to solve a Sudoku puzzle by filling the empty cells. Empty cells are indicated b ...

  10. leetcode第七题--Reverse Integer

    Problem: Reverse digits of an integer. Example1: x = 123, return 321Example2: x = -123, return -321 ...