当前位置:网站首页>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
边栏推荐
- February 13, 2022-3-middle order traversal of binary tree
- [programmers' English growth path] English learning serial one (verb general tense)
- Development of C language standard
- Anaconda3 安装cv2
- MySQL 20 MySQL data directory
- CSDN Q & a tag skill tree (V) -- cloud native skill tree
- Why is MySQL still slow to query when indexing is used?
- 基于Pytorch的LSTM实战160万条评论情感分类
- MySQL26-性能分析工具的使用
- Anaconda3 installation CV2
猜你喜欢
MySQL21-用戶與權限管理
CSDN问答标签技能树(五) —— 云原生技能树
Breadth first search rotten orange
How to find the number of daffodils with simple and rough methods in C language
Mysql30 transaction Basics
MySQL26-性能分析工具的使用
Unicode decodeerror: 'UTF-8' codec can't decode byte 0xd0 in position 0 successfully resolved
基于Pytorch肺部感染识别案例(采用ResNet网络结构)
CSDN问答标签技能树(一) —— 基本框架的构建
MySQL23-存储引擎
随机推荐
February 13, 2022 - Maximum subarray and
Mysql23 storage engine
MySQL21-用户与权限管理
MySQL26-性能分析工具的使用
February 13, 2022-3-middle order traversal of binary tree
Record the first JDBC
【C语言】深度剖析数据存储的底层原理
【博主推荐】SSM框架的后台管理系统(附源码)
虚拟机Ping通主机,主机Ping不通虚拟机
Some problems in the development of unity3d upgraded 2020 VR
MySQL36-数据库备份与恢复
Database middleware_ MYCAT summary
Mysql35 master slave replication
Pytorch RNN actual combat case_ MNIST handwriting font recognition
[BMZCTF-pwn] 12-csaw-ctf-2016-quals hungman
[C language] deeply analyze the underlying principle of data storage
CSDN-NLP:基于技能树和弱监督学习的博文难度等级分类 (一)
Just remember Balabala
How to find the number of daffodils with simple and rough methods in C language
A trip to Macao - > see the world from a non line city to Macao