当前位置:网站首页>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
边栏推荐
- [unity] simulate jelly effect (with collision) -- tutorial on using jellysprites plug-in
- [paper reading notes] - cryptographic analysis of short RSA secret exponents
- @Controller, @service, @repository, @component differences
- Global and Chinese market of transfer switches 2022-2028: Research Report on technology, participants, trends, market size and share
- Solve the problem that XML, YML and properties file configurations cannot be scanned
- How to change php INI file supports PDO abstraction layer
- Adaptive Bezier curve network for real-time end-to-end text recognition
- 解决:log4j:WARN Please initialize the log4j system properly.
- MySQL23-存儲引擎
- Csdn-nlp: difficulty level classification of blog posts based on skill tree and weak supervised learning (I)
猜你喜欢
MySQL24-索引的数据结构
基于Pytorch的LSTM实战160万条评论情感分类
MySQL36-数据库备份与恢复
CSDN question and answer module Title Recommendation task (II) -- effect optimization
Pytoch LSTM implementation process (visual version)
CSDN问答标签技能树(五) —— 云原生技能树
基于Pytorch肺部感染识别案例(采用ResNet网络结构)
Mysql24 index data structure
MySQL26-性能分析工具的使用
MySQL19-Linux下MySQL的安装与使用
随机推荐
CSDN博文摘要(一) —— 一个简单的初版实现
Navicat 導出錶生成PDM文件
CSDN问答标签技能树(五) —— 云原生技能树
该不会还有人不懂用C语言写扫雷游戏吧
Water and rain condition monitoring reservoir water and rain condition online monitoring
MySQL23-存儲引擎
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
MySQL27-索引優化與查詢優化
基于Pytorch的LSTM实战160万条评论情感分类
Esp8266 at+cipstart= "", "", 8080 error closed ultimate solution
Unicode decodeerror: 'UTF-8' codec can't decode byte 0xd0 in position 0 successfully resolved
CSDN问答标签技能树(二) —— 效果优化
Moteur de stockage mysql23
Development of C language standard
MySQL27-索引优化与查询优化
Baidu Encyclopedia data crawling and content classification and recognition
pytorch的Dataset的使用
@Controller, @service, @repository, @component differences
Nanny hand-in-hand teaches you to write Gobang in C language
【博主推荐】SSM框架的后台管理系统(附源码)