当前位置:网站首页>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
边栏推荐
- MySQL21-用戶與權限管理
- Mysql 其他主机无法连接本地数据库
- Invalid global search in idea/pychar, etc. (win10)
- Mysql34 other database logs
- MySQL20-MySQL的数据目录
- Unicode decodeerror: 'UTF-8' codec can't decode byte 0xd0 in position 0 successfully resolved
- 35 is not a stumbling block in the career of programmers
- Mysql24 index data structure
- [leectode 2022.2.13] maximum number of "balloons"
- Breadth first search rotten orange
猜你喜欢

35 is not a stumbling block in the career of programmers

Mysql36 database backup and recovery

API learning of OpenGL (2002) smooth flat of glsl

MySQL25-索引的创建与设计原则

Other new features of mysql18-mysql8

Mysql24 index data structure

CSDN question and answer tag skill tree (I) -- Construction of basic framework

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

Database middleware_ MYCAT summary

基于Pytorch的LSTM实战160万条评论情感分类
随机推荐
MySQL30-事务基础知识
Mysql36 database backup and recovery
【博主推荐】asp.net WebService 后台数据API JSON(附源码)
[C language foundation] 04 judgment and circulation
Bytetrack: multi object tracking by associating every detection box paper reading notes ()
MySQL 29 other database tuning strategies
MySQL21-用戶與權限管理
CSDN question and answer tag skill tree (II) -- effect optimization
[paper reading notes] - cryptographic analysis of short RSA secret exponents
Water and rain condition monitoring reservoir water and rain condition online monitoring
Mysql 其他主机无法连接本地数据库
Anaconda3 installation CV2
windows下同时安装mysql5.5和mysql8.0
Adaptive Bezier curve network for real-time end-to-end text recognition
【博主推荐】C# Winform定时发送邮箱(附源码)
Windows cannot start the MySQL service (located on the local computer) error 1067 the process terminated unexpectedly
windows无法启动MYSQL服务(位于本地计算机)错误1067进程意外终止
Postman uses scripts to modify the values of environment variables
Mysql27 - Optimisation des index et des requêtes
Complete web login process through filter