当前位置:网站首页>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
边栏推荐
- Case identification based on pytoch pulmonary infection (using RESNET network structure)
- Just remember Balabala
- MySQL完全卸载(Windows、Mac、Linux)
- API learning of OpenGL (2003) gl_ TEXTURE_ WRAP_ S GL_ TEXTURE_ WRAP_ T
- MySQL27-索引優化與查詢優化
- Mysql27 index optimization and query optimization
- Mysql30 transaction Basics
- 该不会还有人不懂用C语言写扫雷游戏吧
- Mysql28 database design specification
- Global and Chinese markets of static transfer switches (STS) 2022-2028: Research Report on technology, participants, trends, market size and share
猜你喜欢
数据库中间件_Mycat总结
Navicat 导出表生成PDM文件
MySQL27-索引优化与查询优化
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
API learning of OpenGL (2003) gl_ TEXTURE_ WRAP_ S GL_ TEXTURE_ WRAP_ T
Mysql27 index optimization and query optimization
Complete web login process through filter
Record the first JDBC
1. Mx6u learning notes (VII): bare metal development (4) -- master frequency and clock configuration
Win10: how to modify the priority of dual network cards?
随机推荐
C language advanced pointer Full Version (array pointer, pointer array discrimination, function pointer)
windows下同时安装mysql5.5和mysql8.0
CSDN question and answer module Title Recommendation task (I) -- Construction of basic framework
API learning of OpenGL (2003) gl_ TEXTURE_ WRAP_ S GL_ TEXTURE_ WRAP_ T
Just remember Balabala
Global and Chinese market of operational amplifier 2022-2028: Research Report on technology, participants, trends, market size and share
MySQL30-事务基础知识
在jupyter NoteBook使用Pytorch进行MNIST实现
Mysql27 index optimization and query optimization
【博主推荐】SSM框架的后台管理系统(附源码)
第一篇博客
How to find the number of daffodils with simple and rough methods in C language
MySQL24-索引的数据结构
【博主推荐】C#MVC列表实现增删改查导入导出曲线功能(附源码)
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
Global and Chinese market of thermal mixers 2022-2028: Research Report on technology, participants, trends, market size and share
February 13, 2022-3-middle order traversal of binary tree
CSDN问答标签技能树(二) —— 效果优化
MySQL18-MySQL8其它新特性
Bytetrack: multi object tracking by associating every detection box paper reading notes ()