解决Navicat 出错:1130-host . is not allowed to connect to this MySql server,MySQL
1. 改表法。
可能是你的帐号不允许从远程登陆,只能在localhost。这个时候只要在localhost的那台电脑,登入MySQL后,更改 "mysql" 数据库里的 "user" 表里的 "host" 项,从"localhost"改称"%"
mysql -u root -p
mysql>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服务即可~
以上就是解决MySQL Error (2013): Lost connection to MySQL server at waiting for initial communication packet的全文介绍,希望对您学习和使用数据库有所帮助.
2. 授权法。
例如,你想myuser使用mypassword从任何主机连接到mysql服务器的话。
GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'%' IDENTIFIED BY 'mypassword' WITH GRANT OPTION;
FLUSH PRIVILEGES;
如果你想允许用户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;
如果你想允许用户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>FLUSH RIVILEGES 使修改生效.就可以了
另外一种方法,不过我没有亲自试过的,在csdn.net上找的,可以看一下.
在安装mysql的机器上运行:
1、d:/mysql/bin/>mysql -h localhost -u root //这样应该可以进入MySQL服务器
2、mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION //赋予任何主机访问数据的权限
3、mysql>FLUSH PRIVILEGES //修改生效
4、mysql>EXIT //退出MySQL服务器
这样就可以在其它任何的主机上以root身份登录啦!
解决Navicat 出错:1130-host . is not allowed to connect to this MySql server,MySQL的更多相关文章
- ERROR 1130: Host ’...′ is not allowed to connect to this MySQL server
/******************************************************************** * ERROR 1130: Host ’...′ is no ...
- 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 ...
- ERROR 1130: Host is not allowed to connect to this MySQL server
解决远程连接mysql错误1130代码的方法 今天在用远程连接Mysql服务器的数据库,不管怎么弄都是连接不到,错误代码是1130,ERROR 1130: Host 192.168.2.159 is ...
- 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 ...
- 1130 host is not allowed to connect to
mysql 远程访问不行解决方法 Host is not allowed to connect to this MySQL server 如果你想连接你的mysql的时候发生这个错误: ERROR 1 ...
- ***远程连接MYSQL提示1130 - 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 serve ...
- 解决远程连接数据库:Host is not allowed to connect to this MySQL server
远程连接数据时,报以下提示: Host 'web1' is not allowed to connect to this MySQL server 原因是数据库服务不允许远程登录,没有授权导致,解决方 ...
- 解决Navicat 报错:1130-host ... is not allowed to connect to this MySql server,MySQL不允许从远程访问的方法
1. 改表法. 可能是你的帐号不允许从远程登陆,只能在localhost.这个时候只要在localhost的那台电脑,登入mysql后,更改 "mysql" 数据库里的 " ...
- 出现并解决Navicat 报错:1130-host ... is not allowed to connect to this MySql server,MySQL
例如,你想myuser使用mypassword从任何主机连接到mysql服务器的话. GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'%' IDENTIFIED BY ...
- mysql 远程访问不行解决方法 Host is not allowed to connect to this MySQL server
mysql 远程访问不行解决方法 Host is not allowed to connect to this MySQL server 如果你想连接你的mysql的时候发生这个错误: ERROR 1 ...
随机推荐
- Android 右上角菜单栏
1 创建菜单栏 在res下新建menu文件夹,并且创建righttopmenu.xml righttopmenu.xml: <?xml version="1.0" encod ...
- Django+Xadmin打造在线教育系统(八)
首页和全局404,500配置 轮播图 公开课 授课机构 新建view ## 首页view class IndexView(View): def get(self,request): # 取出轮播图 a ...
- restTemplate 发送http post请求带有文件流、参数
String httpMethod = ""; RestTemplate restTemplate = new RestTemplate(); String args = &quo ...
- bzoj 4196 [Noi2015]软件包管理器 (树链剖分+线段树)
4196: [Noi2015]软件包管理器 Time Limit: 10 Sec Memory Limit: 512 MBSubmit: 2852 Solved: 1668[Submit][Sta ...
- Nagios 监控 Mysql
被监控机的Mysql监控创建专用数据库.专用数据库账户mysql -uroot -pcreate database nagios_monitor;grant select on nagios_moni ...
- 【题解】 bzoj2462: [BeiJing2011]矩阵模板
题面戳我 Solution 二维矩阵\(hash\),判断即可 自己YY了一个方法,\(bzoj\)T到飞,(一开始还用的三\(hash\)),交到luogu貌似跑的不慢啊qwq (我是不会告诉你全输 ...
- 自学华为IoT物联网_06 智慧家庭物联网常见问题及解决方案
点击返回自学华为IoT物流网 自学华为IoT物联网_06 智慧家庭物联网常见问题及解决方案 1. 家庭中遇到的问题 2.1 华为智慧家庭概念的发展历程 2.2 华为智慧家庭的解决方案架构 智慧家庭主要 ...
- 环境变量PS1,修改命令行提示符样式
推荐模板 export PS1="\[\e[37;40m\][\[\e[31;40m\]\u\[\e[0m@\[\e[33;40m\]\H \[\e[36;40m\]\w\[\e[0m\] ...
- [CF977F]Consecutive Subsequence
题目描述 You are given an integer array of length n. You have to choose some subsequence of this array o ...
- html块、含样式的标签
html块 1.div标签 块元素,表示一块内容,没有具体的语义. 2.span标签 行内元素,表示一行中的一小段内容,没有具体的语义. 含样式和语义的标签 1.em标签 行内元素,表示语气中的强调词 ...