当前位置:网站首页>mysql无法远程连接 Can‘t connect to MySQL server on ‘xxx.xxx.xxx.xxx‘ (10060 “Unknown error“)
mysql无法远程连接 Can‘t connect to MySQL server on ‘xxx.xxx.xxx.xxx‘ (10060 “Unknown error“)
2022-08-09 22:52:00 【派小兴 ҈҉҈҉҈҉҈҉҈】
很多小伙伴在自己的服务器上面安装了mysql,然后发现自己把服务器中的mysql服务打开,然后防火墙也关掉了,但是就是连接不上,然后使用用户登录,密码也输入正确但是就是连不上,并且提示这个错误

这时候发现是因为host只设定了本地连接,需要修改才能进行连接
进入数据库
mysql -u root -p
输入完root的密码进入到数据库
use mysql;使用到mysql的这个库

查看一下user的host
select host,user from user;
这时候就发现我这个adai这个用户他的host只能是本地连接,这时候就需要把他改成%,就可以让别人用这个账号进行连接
update user set host='%' where user='adai';
我们再进行查看

这时候已经修改完成了,这时候在进行连接就可以连接成功了

边栏推荐
猜你喜欢
随机推荐
基于ABP的AppUser对象扩展
【SSL集训DAY2】Sort【树状数组】
深圳堡垒机厂家有哪些?重点推荐哪家?
KingbaseGIS Jin Cang database using manual (6.3. Geometric object creation function)
直播app开发搭建,flutter 实现自适应、自动换行、相对布局
How to know the computer boot record?
The latest "Grain Academy Development Tutorial" in 2022: 10 - Front-end payment module
首席信息官如何将可持续性和技术结合起来
【JZOF】77 Print binary tree in zigzag
多商户商城系统功能拆解25讲-平台端分销申请
What are the Shenzhen fortress machine manufacturers?Which one do you recommend?
【哲理】读书的意义
How to match garbled characters regularly?
探索TiDB Lightning源码来解决发现的bug
[Cloud Native] This article explains how to add Tencent Crane to Kubevela addon
【集训DAY5】选数字【数学】
LiveData : Transformations.map和 Transformations.switchMap用法
redis分布式锁代码示例
70. Stair Climbing Advanced Edition
Cmake 用法记录









