Navicat连接mysql时报错is not allowed to connect to this MySQL

1. 改表法。

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

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

注:个人觉得不太适用!

【错误内容】:SQL Error (2013): Lost connection to MySQL server at ‘waiting for initial communication packet’, system error: 0

【错产生经过】:链接MySQL时出现.

【解决办法】:打开my.ini,找到[mysqld]项,在其后加入一句:skip-name-resolve,保存,重启mysql服务即可~

2. 授权法。

1)例如,你想myuser使用mypassword从任何主机连接到mysql服务器的话。

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

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

GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'192.168.1.3' IDENTIFIED BY 'mypassword' WITH GRANT OPTION;FLUSH   PRIVILEGES;

3)如果你想允许用户myuser从ip为192.168.1.6的主机连接到mysql服务器的dk数据库,并使用mypassword作为密码

GRANT ALL PRIVILEGES ON dk.* TO 'myuser'@'192.168.1.3' IDENTIFIED BY 'mypassword' WITH GRANT OPTION;FLUSH   PRIVILEGES;

参考:
远程连接MySQL数据库报错:is not allowed to connect to this MYSQL server的解决办法

Navicat连接mysql报错is not allowed to connect to this MySQL相关推荐

  1. navicat连接pgsql报错:authentication method 10 not supported

    navicat连接pgsql报错:authentication method 10 not supported 解决方案:找到pgsql的安装目录下的pg_hba.conf文件 用文本编辑器打开后做如 ...

  2. mysql报错No operations allowed after statement closed

    mysql报错No operations allowed after statement closed 网上搜了很多,感觉都没什么作用,很多都是改等待时间,其实还有一个原因,可能是数据库锁住了,这种报 ...

  3. 【Exception】Navicat连接Oracle闪退 Navicat连接Oracle 报错:connection to server failed,probable Oracle Net admi

    [Exception]Navicat连接Oracle闪退 Navicat连接Oracle 报错:connection to server failed,probable Oracle Net admi ...

  4. mysql远程连接 host_MySQL远程连接:Host 'x' is not allowed to connect to this MySQL server

    MySql数据库:Host 'localhost' is not allowed to connect to this MySQL server 修改mysql的roo ...

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

    本文转载于http://www.cnblogs.com/jesu/p/5650699.html,向原作者表示感谢,如有侵权,请联系我. 这段时间在研究火车头的入库教程,在"配置登陆信息和数据 ...

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

    解决服务器连接错误Host 'XXX' is not allowed to connect to this MySQL server问题,有碰到此问题的同学可进入参考. 这段时间在研究火车头的入库教程 ...

  7. MySQL:使用NavicatIP远程连接失败,提示“is not allowed to connect to this MySql server”

    问题: 使用Navicat Premium用IP远程连接MySQL时失败,提示"is not allowed to connect to this MySql server",但在 ...

  8. 记一次mysql报错:The user specified as a definer (‘mysql.infoschema‘@‘localhost‘) does not exists

    最近将之前用的 mysql5.5 升级到了 mysql8.0,第一天还能正常使用,几天没用后,登录发现报错:The user specified as a definer ('mysql.infosc ...

  9. navicat连接客户端报错

    怎么感觉oracle和sql server是一个货色.装个服务得装半天,还是mysql好,一下子就好了!下面有一个在centos7上面安装oracle11g的详细步骤,感觉找不到比这个更详细的了吧! ...

最新文章

  1. 精通python能干什么-转行做数据分析,是否需要精通python?
  2. python 查看PIL包下的 Image.py 模块时 import _builtin__显示 python version 3.6 does not have module __builtin__
  3. $arr[]=$v 把 $v 这个东西 放到 $arr[] 这个数组中
  4. python模块管理工具,Python的包管理工具
  5. cdoj 1328 卿学姐与诡异村庄 Label:并查集 || 二分图染色
  6. java 银行卡号格式化_JS银行卡号格式化 - JavaScript常用效果 - Front-End - NalanXue's Blog...
  7. STL—内存的配置与释放
  8. Visual Studio 2015的破解密钥
  9. CAPL中的键值对(hash)数据类型
  10. DroidCamX 让你的android手机摄像头变身电脑网络摄像头
  11. Adobe PDF 生成PDF文件出错的解决办法
  12. 161128、Redis 4.0发布及其新功能介绍
  13. Python进阶——自省
  14. 在vs2010中运行guge.cpp(SkeletonDepth)的时候程序是网上的,可是总是提示我没有KinectUNI.lib。
  15. Kylin 之Cube 构建优化
  16. CATIA二次开发—探讨CATIA单位问题
  17. JDK源码学习系列07----Stack
  18. ESP8266 AT指令设置及51单片机的控制
  19. matplotlib 常用图形绘制与官方文档
  20. android线程作用,Android线程介绍

热门文章

  1. LoadBalancerCacheManager not available, returning delegate without caching.
  2. One-Hot Encoding
  3. 英语基础太差,到底能不能学好编程?
  4. python模拟登录qq邮箱
  5. Tomcat调优总结【内存和线程】
  6. mega2560电脑识别不到端口后_mega2560在win7 64位安装驱动成功
  7. 数字图像处理——信用卡数字识别
  8. 用java实现生成12位的随机纯数字且首位不能为0
  9. java 中国象棋下载不用vip,单机象棋手机版免费版下载-单机象棋最新版v1.4.2 不联网版-腾牛安卓网...
  10. 使用NPOI按照word模板文件生成新的word文件