mysql 远程访问不行解决方法 Host is not allowed to connect to this MySQL server

如果你想连接你的mysql的时候发生这个错误:

ERROR 1130: Host ‘192.168.1.3’ is not allowed to connect to this MySQL server

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

mysql -u root -pvmwaremysql>use mysql;mysql>update user set host = ‘%’ where user = ‘root';mysql>select host, user from user;

2. 授权法。例如,你想myuser使用mypassword从任何主机连接到mysql服务器的话。

GRANT ALL PRIVILEGES ON *.* TO ‘myuser’@’%’ IDENTIFIED BY ‘mypassword’ WITH GRANT OPTION;

如果你想允许用户myuser从ip为192.168.1.3的主机连接到mysql服务器,并使用mypassword作为密码

GRANT ALL PRIVILEGES ON *.* TO  ‘root’@’192.168.1.3′ IDENTIFIED BY ‘mypassword’ WITH GRANT OPTION;

GRANT ALL PRIVILEGES ON *.* TO ‘root’@’10.10.40.54′ IDENTIFIED BY ‘123456’ WITH GRANT OPTION;

mysql 远程访问不行解决方法 Host is not allowed to connect to this MySQL server的更多相关文章

  1. 账号不允许远程访问服务器上的mysql数据库的解决办法host is not allowed to connect to this mysql

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

  2. ERROR 1130: Host ’...′ is not allowed to connect to this MySQL server

    /******************************************************************** * ERROR 1130: Host ’...′ is no ...

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

    解决远程连接mysql错误1130代码的方法 今天在用远程连接Mysql服务器的数据库,不管怎么弄都是连接不到,错误代码是1130,ERROR 1130: Host 192.168.2.159 is ...

  4. mysql不能链接远程,报(Host '***.***.***.***' is not allowed to connect to this MySQL server)

    Host '***.***.***.***' is not allowed to connect to this MySQL server 其中***...是本机公网ip; 解决办法: 首先看报错窗口 ...

  5. MYSQL ERROR 1130: Host is not allowed to connect to this MySQL server

    今天安装MYSQL遇到MYSQL ERROR 1130: Host is not allowed to connect to this MySQL server, 试了很多办法都不行 skip-gra ...

  6. ‘Host’ is not allowed to connect to this mysql server

    ‘Host’ is not allowed to  connect to this mysql server mysql 数据库不允许远程连接 方法一:修改 host 表 进入mysql数据库,选择m ...

  7. mysql远程连接 Host * is not allowed to connect to this MySQL server(第一次配置好lnmp环境)

    1.第一次在linux上搭建好mysql,本机windows远程链接报错Host * is not allowed to connect to this MySQL server 2.原因:mysql ...

  8. Navicat 连接MariaDB 失败: Host '*' is not allowed to connect to this MariaDB server

    题描述:Navicat 为管理方便,连接Linux 中Mariadb失败,如下如下错误:Host '*' is not allowed to connect to this MariaDB serve ...

  9. mysql远程连接:ERROR 1130 (HY000): Host '*.*.*.*' is not allowed to connect to this MySQL server解决办法

    安装完MySQL后,远程连接数据库的时候,出现 ERROR 1130 (HY000): Host '192.168.0.1' is not allowed to connect to this MyS ...

随机推荐

  1. pandas索引操作

    Pandas的索引操作 索引对象Index 1. Series和DataFrame中的索引都是Index对象 示例代码: print(type(ser_obj.index)) print(type(d ...

  2. Java微信公众平台开发(五)--文本及图文消息回复的实现

    转自:http://www.cuiyongzhi.com/post/43.html 上篇我们说到回复消息可以根据是否需要上传文件到微信服务器可划分为[普通消息]和[多媒体消息],这里我们来讲述普通消息 ...

  3. c作图-正弦函数图像

    #include<graphics.h>#include<math.h>int main(){    int gmode,gdriver=DETECT; double x1,y ...

  4. d3.js 清除svg

    rave.select(el).html(''); // 不推荐rave.selectAll("svg > *").remove(); // 移除svg内部节点rave.se ...

  5. NetworkView

    [游戏Server中Server的类别] There are two common and proven approaches to structuring a network game which ...

  6. Physics Material

    [Physics Material] 1. The Physics Material is used to adjust friction and bouncing effects of collid ...

  7. css一div内文字居中

    在说到这个问题的时候,也许有人会问CSS中不是有vertical-align属性来设置垂直居中的吗?即使是某些浏览器不支持我只需做少许的CSS Hack技术就可以啊!所以在这里我还要啰嗦两句,CSS中 ...

  8. IWebBrowser和IE浏览器的行为不一样

    原本一直以为IWebBrowser2的行为和IE浏览器的行为应该是一样的,但是最近发现事实不是如此. IE8以后的浏览器都带有兼容模式,而IWebBrowser2默认情况下是在兼容模式下运行的,可以参 ...

  9. 如何安全退出已调用多个Activity的应用

    对于单一Activity的应用来说,退出很简单,直接finish()即可.当然,也可以用killProcess()和System.exit()这样的方法. 但是,对于多Activity的应用来说,在打 ...

  10. intval()函数

    获取变量的整数值 1.转换前转化后 原因: