当前位置:网站首页>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-07-30 04:53: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';
我们再进行查看

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

边栏推荐
- [Awards every week] The "Edge Containers" track of the Cloud Native Programming Challenge invites you to fight!
- VisualStudio2022本地调试进入特别慢问题解决
- Verify that the addShutdownHook hook takes effect
- Xiamen SenseCore Technology MC3172(1): Introduction and Environment Construction
- Intermediate - interview questions
- 复现XXL-JOB 任务调度中心后台任意命令执行漏洞
- 四、Web开发
- SVN View Username and Password
- handler+message [message mechanism]
- 模拟问题(下)
猜你喜欢

1. Get data - requests.get()

2.5 Quick Sort

模拟问题(中)

Plan for many situations in the processing chain

Code readability, pre-checks, comments and summaries
![[MRCTF2020]Hello_misc](/img/ea/0faacf6e544b60e3459d8ace4d5f42.png)
[MRCTF2020]Hello_misc

2.4 hill sorting

Predictive maintenance scheduling of multiple power equipment based on data-driven fault prediction
![[C language] Program environment and preprocessing](/img/d2/a0437da7d651e755951dd2a15827cf.png)
[C language] Program environment and preprocessing

Simulation problem (middle)
随机推荐
Unity beginner 5 cameras follow, border control and simple particle control (2 d)
Introduction to database - MySQL simple introduction
成为一个合格的网安,你知道这些吗?
GCC Rust is approved to be included in the mainline code base, or will meet you in GCC 13
Intermediate - interview questions
小程序npm包--API Promise化
Protobuf compound data types, speaking, reading and writing
Compound Types--references, pointers
Usage of EFR32 as sniffer for Zigbee/Thread
WPF recursively obtains the list of specified control types in the form
go语言学习笔记四
Solve the error SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xb7 in position 0: invalid start b
Xiamen SenseCore Technology MC3172(1): Introduction and Environment Construction
2.6 Radix sort (bucket sort)
POJ1321 棋盘问题(详解)
- B + tree index and MySQL series 】 【 what is the difference between a HASH index
Discourse 自定义头部链接(Custom Header Links)
SVN View Username and Password
[3D Detection Series-PointRCNN] Reproduces the PointRCNN code, and realizes the visualization of PointRCNN3D target detection, including the download link of pre-training weights (starting from 0 and
DAY17, CSRF vulnerability