当前位置:网站首页>MySQL other hosts cannot connect to the local database
MySQL other hosts cannot connect to the local database
2022-07-06 10:54:00 【hyh123a】
Preface
mysql Cannot pass local ip, Such as : This machine IP by 172.16.16.16
172.16.16.16 The connection fails , Only through 127.0.0.1 Connect .
--- Record on 2021 year 8 month
Environmental Science
Ubuntu 20.04
mysql Ver 8.0.26-0ubuntu0.20.04.2 for Linux on x86_64 ((Ubuntu))
Other hosts can Ping Through this machine
solve
To solve this problem, we can try the following two points
1、 Change user name jurisdiction
localhost -> % # This is mentioned in most blogs But say more
2、 modify MySQL The configuration file
2.1 Check the location of the configuration file
cd /etc/mysql
ls
2.2 Modify the configuration file
sudo nano /etc/mysql/my.cnf # One of the two See which configuration file is on your host
sudo nano /etc/mysql/mysql.conf.d # One of the two See which configuration file is on your host
# modify 127.0.0.1 => 0.0.0.0
2.3 restart mysql service
sudo systemctl restart mysql.service
sudo systemctl status mysql.service
# Test connection successful
other
If there is any omission, please add
If you have any questions, please leave a message
If it works, please like it
2021 year 8 Monthly test installation succeeded
边栏推荐
- MySQL23-存儲引擎
- MySQL25-索引的创建与设计原则
- CSDN Q & a tag skill tree (V) -- cloud native skill tree
- [paper reading notes] - cryptographic analysis of short RSA secret exponents
- C language advanced pointer Full Version (array pointer, pointer array discrimination, function pointer)
- MySQL21-用戶與權限管理
- Yum prompt another app is currently holding the yum lock; waiting for it to exit...
- MySQL transaction log
- 1. Mx6u learning notes (VII): bare metal development (4) -- master frequency and clock configuration
- Why is MySQL still slow to query when indexing is used?
猜你喜欢

MySQL22-逻辑架构

Isn't there anyone who doesn't know how to write mine sweeping games in C language

CSDN问答模块标题推荐任务(二) —— 效果优化

How to find the number of daffodils with simple and rough methods in C language

CSDN blog summary (I) -- a simple first edition implementation

Adaptive Bezier curve network for real-time end-to-end text recognition

Mysql26 use of performance analysis tools

Opencv uses freetype to display Chinese

Mysql27 index optimization and query optimization

【博主推荐】C#生成好看的二维码(附源码)
随机推荐
Global and Chinese market of operational amplifier 2022-2028: Research Report on technology, participants, trends, market size and share
Mysql33 multi version concurrency control
How to find the number of daffodils with simple and rough methods in C language
MySQL24-索引的数据结构
Postman Interface Association
Copy constructor template and copy assignment operator template
MySQL flush operation
API learning of OpenGL (2003) gl_ TEXTURE_ WRAP_ S GL_ TEXTURE_ WRAP_ T
Discriminant model: a discriminant model creation framework log linear model
MySQL26-性能分析工具的使用
35 is not a stumbling block in the career of programmers
MySQL29-数据库其它调优策略
[leectode 2022.2.13] maximum number of "balloons"
[reading notes] rewards efficient and privacy preserving federated deep learning
CSDN blog summary (I) -- a simple first edition implementation
第一篇博客
A brief introduction to the microservice technology stack, the introduction and use of Eureka and ribbon
Pytorch RNN actual combat case_ MNIST handwriting font recognition
windows无法启动MYSQL服务(位于本地计算机)错误1067进程意外终止
API learning of OpenGL (2004) gl_ TEXTURE_ MIN_ FILTER GL_ TEXTURE_ MAG_ FILTER