MYSQL不能从远程连接的一个解决方法(s not allowed to connect to this MySQL )
来源:互联网 发布:ubuntu必装软件 编辑:程序博客网 时间:2024/05/24 07:13
解决方法:
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 'myuser'@'192.168.1.3' IDENTIFIED BY
'mypassword' WITH GRANT OPTION;
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 'myuser'@'192.168.1.3' IDENTIFIED BY
'mypassword' WITH GRANT OPTION;
0 0
- MYSQL不能从远程连接的一个解决方法(s not allowed to connect to this MySQL )
- MYSQL不能从远程连接的一个解决方法(s not allowed to connect to this MySQL server)
- MYSQL不能从远程连接的一个解决方法(s not allowed to connect to this MySQL server)
- mysql不能远程连接解决办法(Host is not allowed to connect to this MySQL server)
- 远程连接mysql时,提示“is not allowed to connect to this MySQL server”的解决方法
- mysql远程连接报错: Host * is not allowed to connect to this MySQL server,解决方法
- 连接远程MYSQL提示 is not allowed to connect to this mysql 解决方法
- is not allowed to connect to this MySQL server,不能远程打开 mysql 数据库
- mysql 远程访问不行解决方法 Host is not allowed to connect to this MySQL server
- Host 'XXX' is not allowed to connect to this MySQL server 解决方法/开启MySQL远程账号
- mysql 远程访问不行解决方法,Host '' is not allowed to connect to this MySQL server
- mysql 远程访问不行解决方法 Host is not allowed to connect to this MySQL server
- mysql 远程访问不行解决方法 Host is not allowed to connect to this MySQL server
- mysql 远程访问不行解决方法 Host is not allowed to connect to this MySQL server
- mysql 远程访问不行解决方法 Host is not allowed to connect to this MySQL server
- Mysql 远程连接错误:1130-host IP is not allowed to connect to this MySql server
- 远程连接MYSQL提示Host is not allowed to connect to this MySQL server
- 远程连接MYSQL提示Host is not allowed to connect to this MySQL server(...
- Hibernate4.3.5报Could not bind factory to JNDI的解决方案
- Myeclipse使用配色方案
- FNetworking官网入门教程简单翻译,学习
- 百度图片api
- Ignatius and the Princess III 【HDU--1028-母函数】
- MYSQL不能从远程连接的一个解决方法(s not allowed to connect to this MySQL )
- POJ1637 Sightseeing tour 网络流
- dede调用三级栏目及文章
- 正则表达式
- LeetCode OJ算法题(三十七):Count and Say
- 美女图片采集器 (源码+解析)
- 第七次codeforces竞技结束 #258 Div 2
- hdu 2019 数列有序
- excel中计算两个日期的时间间隔