1.改表法

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

mysql -u root -p

mysql>use mysql;

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

mysql>flush privileges;

mysql>select host, user from user;

mysql>exit

2.授权法

在安装mysql的机器上运行:

1、mysql -h -u

2、mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION //赋予任何主机访问数据的权限

3、mysql>FLUSH PRIVILEGES //修改生效

4、mysql>EXIT //退出MySQL服务器

linux中mysql运程连接时错误host ‘192.168.0.1’ is not allowed to connect to this MySql server的更多相关文章

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

  2. ERROR 1130 (HY000): Host '192.168.0.190' is not allowed to connect to this MySQL serv

    环境: CentOS6.2.MySQL5.1 问题描述: 在配置文件中将需要连接的MySQL的host设置为192.168.0.190(其实就是我自己的IP地址),然后运行自己的程序,结果返回MySQ ...

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

  4. 解决ERROR 1130: Host '192.168.11.1' is not allowed to connect to this MySQL

    使用navicat进行远程登录MySQL时,报出 ERROR 1130: Host '192.168.11.1' is not allowed to connect to this MySQL  se ...

  5. Mysql远程连接报错:SQL Error (1130): Host '192.168.6.128' is not allowed to connect to this MySQL server

    通过SQLyog连接linux中的MySQL报错问题:SQL Error (1130): Host '192.168.6.128' is not allowed to connect to this ...

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

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

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

  9. 1130-Host '192.168.0.105' is not allowed to connect to this MySQL server的解决方案

    在CentOS 7服务器(192.168.0.118)上安装mysql5.7.17后,在本地(192.168.0.105)通过Navicat连接服务器上的MySQL报错,报错如图所示: Paste_I ...

随机推荐

  1. Vim速查脑图

  2. ueditor 上传的图片在内容里显示的尺寸过大的问题

    没改动之前是上面这样的,图片显示不开,撑出了滚动条,想让他自适应100%,不出现滚动条 网上有方法 1.ueditor 的 themes 文件夹下有个iframe.css 加入以下代码,保存(原先的c ...

  3. oracle删除用户及表空间,导入用户和数据

    drop user xxx cascade; drop tablespace xxx including contents and datafiles; create tablespace xxx d ...

  4. lua随机数函数

    function rnd(max)  --lua的第1次random数不靠谱,取第3次的靠谱  local ret=0  math.randomseed(os.time())  for i=1,3 d ...

  5. codeforces 733D

    明白了自己这么菜的原因多半是赛后不肯去补那些需要多花点时间思考的题目以及效率不高,但愿现在还不算晚... #include<bits/stdc++.h> #include<iostr ...

  6. phpstorm version 2016.2 License Server激活

    phpstorm version 2016.2 License Server激活 安装后,在激活的时候选择 license server; 输入如下地址激活: http://jetbrains.ten ...

  7. Nginx-默认不压缩HTTP/1.0与长连接的关系

    在移动的 http 请求量和联通不相上下的前提下,移动的 http response 带来的网络流量是联通的 2.5 倍.移动大概有 3 成的请求都没有做压缩,而联通几乎都是经过压缩的.那些没有经过压 ...

  8. B-index、bitmap-index、text-index使用场景详解

    索引的种类:B-tree索引.Bitmap索引.TEXT index1.  B-tree索引介绍: B-tree 是一种常见的数据结构,也称多路搜索树,并不是二叉树.B-tree 结构可以显著减少定位 ...

  9. How to Remove Table Partitioning in SQL Server

    In this article we will see how we can remove partitions from a table in a database in SQL server. I ...

  10. sql 2008 游标

    begin declare PlatformBulletin --定义游标 open PlatformBulletin --打开游标 declare @userid int,@zmscompanyid ...