当前位置:网站首页>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
边栏推荐
- MySQL 29 other database tuning strategies
- 基于Pytorch的LSTM实战160万条评论情感分类
- PyTorch RNN 实战案例_MNIST手写字体识别
- 35 is not a stumbling block in the career of programmers
- [Li Kou 387] the first unique character in the string
- 数据库中间件_Mycat总结
- Idea import / export settings file
- What is the difference between TCP and UDP?
- Global and Chinese market of operational amplifier 2022-2028: Research Report on technology, participants, trends, market size and share
- pytorch的Dataset的使用
猜你喜欢
[unity] simulate jelly effect (with collision) -- tutorial on using jellysprites plug-in
API learning of OpenGL (2002) smooth flat of glsl
Breadth first search rotten orange
CSDN问答模块标题推荐任务(二) —— 效果优化
数据库中间件_Mycat总结
CSDN question and answer module Title Recommendation task (I) -- Construction of basic framework
Csdn-nlp: difficulty level classification of blog posts based on skill tree and weak supervised learning (I)
Mysql36 database backup and recovery
CSDN question and answer module Title Recommendation task (II) -- effect optimization
CSDN blog summary (I) -- a simple first edition implementation
随机推荐
Time in TCP state_ The role of wait?
windows下同时安装mysql5.5和mysql8.0
[C language] deeply analyze the underlying principle of data storage
PyTorch RNN 实战案例_MNIST手写字体识别
Global and Chinese markets for aprotic solvents 2022-2028: Research Report on technology, participants, trends, market size and share
CSDN blog summary (I) -- a simple first edition implementation
Have you mastered the correct posture of golden three silver four job hopping?
Advantages and disadvantages of evaluation methods
Global and Chinese market of wafer processing robots 2022-2028: Research Report on technology, participants, trends, market size and share
Emotional classification of 1.6 million comments on LSTM based on pytoch
MySQL完全卸载(Windows、Mac、Linux)
Mysql25 index creation and design principles
Mysql32 lock
Copy constructor template and copy assignment operator template
Pytoch LSTM implementation process (visual version)
MySQL28-数据库的设计规范
MySQL flush operation
CSDN问答标签技能树(二) —— 效果优化
Navicat 导出表生成PDM文件
C语言标准的发展