MYSQL不能从远程连接的一个解决方法(s not allowed to connect to this MySQL server)
时间:2024-01-19 02:57:34
如果你想连接你的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 'myuser'@'192.168.1.3' IDENTIFIED BY
'mypassword' WITH GRANT OPTION;
标签:远程连接
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
vue3中给数组赋值丢失响应式的解决
2024-05-22 10:44:41
![](https://img.aspxhome.com/file/2023/7/123207_0s.gif)
sql server查询时间技巧分享
2024-01-15 06:54:05
mysql数据库优化总结(心得)
2024-01-17 17:50:37
![](https://img.aspxhome.com/file/2023/4/110094_0s.jpg)
修改vue+webpack run build的路径方法
2024-04-28 10:54:08
Python实现将n个点均匀地分布在球面上的方法
2021-02-21 20:56:33
![](https://img.aspxhome.com/file/2023/1/107081_0s.png)
浅谈Python]程序的分支结构
2022-05-03 07:27:45
AJAX的jQuery实现入门(一)
2008-05-01 12:55:00
![](https://img.aspxhome.com/file/UploadPic/20085/1/20085113327455s.gif)
python实点云分割k-means(sklearn)详解
2023-11-06 20:36:03
![](https://img.aspxhome.com/file/2023/0/96920_0s.jpg)
Python调整数组形状如何实现
2021-01-06 09:55:34
Python tkinter的grid布局及Text动态显示方法
2023-06-28 14:54:00
![](https://img.aspxhome.com/file/2023/8/87868_0s.jpg)
Python调用实现最小二乘法的方法详解
2022-07-04 16:31:00
![](https://img.aspxhome.com/file/2023/7/66377_0s.png)
python服务器与android客户端socket通信实例
2022-04-28 02:30:31
mysql 8.0.18 安装配置优化教程
2024-01-19 22:43:59
![](https://img.aspxhome.com/file/2023/3/85813_0s.png)
vue-cli-service build 环境设置方式
2024-05-25 15:17:08
![](https://img.aspxhome.com/file/2023/8/123938_0s.png)
如何使用共享连接减少空闲的连接数?
2010-05-16 15:15:00
百万行WPF项目代码重构记录分析
2023-12-30 23:00:28
MSSQL MySQL 数据库分页(存储过程)
2024-01-29 13:28:13
python3 反射的四种基本方法解析
2023-10-25 16:04:39
Python兔子毒药问题实例分析
2023-11-14 11:23:56
Python 使用folium绘制leaflet地图的实现方法
2023-06-11 05:58:36
![](https://img.aspxhome.com/file/2023/1/80421_0s.jpg)