当前位置:网站首页>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
边栏推荐
- MySQL36-数据库备份与恢复
- Windchill configure remote Oracle database connection
- MySQL27-索引优化与查询优化
- Mysql21 - gestion des utilisateurs et des droits
- Copy constructor template and copy assignment operator template
- Postman Interface Association
- Isn't there anyone who doesn't know how to write mine sweeping games in C language
- CSDN问答标签技能树(二) —— 效果优化
- MySQL22-逻辑架构
- Database middleware_ MYCAT summary
猜你喜欢
CSDN question and answer module Title Recommendation task (II) -- effect optimization
Valentine's Day is coming, are you still worried about eating dog food? Teach you to make a confession wall hand in hand. Express your love to the person you want
【博主推荐】C# Winform定时发送邮箱(附源码)
Unicode decodeerror: 'UTF-8' codec can't decode byte 0xd0 in position 0 successfully resolved
MySQL25-索引的创建与设计原则
Complete web login process through filter
Mysql23 storage engine
Just remember Balabala
Adaptive Bezier curve network for real-time end-to-end text recognition
windows下同时安装mysql5.5和mysql8.0
随机推荐
MySQL18-MySQL8其它新特性
Mysql25 index creation and design principles
解决:log4j:WARN Please initialize the log4j system properly.
MySQL 29 other database tuning strategies
CSDN问答标签技能树(五) —— 云原生技能树
csdn-Markdown编辑器
Why is MySQL still slow to query when indexing is used?
A brief introduction to the microservice technology stack, the introduction and use of Eureka and ribbon
CSDN博文摘要(一) —— 一个简单的初版实现
Advantages and disadvantages of evaluation methods
【C语言】深度剖析数据存储的底层原理
MySQL22-逻辑架构
CSDN问答模块标题推荐任务(一) —— 基本框架的搭建
ByteTrack: Multi-Object Tracking by Associating Every Detection Box 论文阅读笔记()
[Li Kou 387] the first unique character in the string
Bytetrack: multi object tracking by associating every detection box paper reading notes ()
Postman environment variable settings
数据库中间件_Mycat总结
How to find the number of daffodils with simple and rough methods in C language
MySQL flush operation