当前位置:网站首页>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
边栏推荐
- Breadth first search rotten orange
- [C language foundation] 04 judgment and circulation
- 解决:log4j:WARN Please initialize the log4j system properly.
- 导入 SQL 时出现 Invalid default value for ‘create_time‘ 报错解决方法
- [reading notes] rewards efficient and privacy preserving federated deep learning
- API learning of OpenGL (2005) gl_ MAX_ TEXTURE_ UNITS GL_ MAX_ TEXTURE_ IMAGE_ UNITS_ ARB
- Global and Chinese market for intravenous catheter sets and accessories 2022-2028: Research Report on technology, participants, trends, market size and share
- MySQL19-Linux下MySQL的安装与使用
- 评估方法的优缺点
- MySQL36-数据库备份与恢复
猜你喜欢

Unicode decodeerror: 'UTF-8' codec can't decode byte 0xd0 in position 0 successfully resolved

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

Mysql34 other database logs

Pytorch RNN actual combat case_ MNIST handwriting font recognition

MySQL 29 other database tuning strategies

Mysql21 user and permission management

Invalid global search in idea/pychar, etc. (win10)

解决:log4j:WARN Please initialize the log4j system properly.

Mysql25 index creation and design principles

Mysql22 logical architecture
随机推荐
Texttext data enhancement method data argument
How to change php INI file supports PDO abstraction layer
该不会还有人不懂用C语言写扫雷游戏吧
Anaconda3 安装cv2
MySQL30-事务基础知识
Win10: how to modify the priority of dual network cards?
Pytoch LSTM implementation process (visual version)
Kubesphere - deploy the actual combat with the deployment file (3)
Mysql30 transaction Basics
MySQL23-存儲引擎
Mysql36 database backup and recovery
解决扫描不到xml、yml、properties文件配置
Mysql33 multi version concurrency control
[unity] simulate jelly effect (with collision) -- tutorial on using jellysprites plug-in
Generate PDM file from Navicat export table
[paper reading notes] - cryptographic analysis of short RSA secret exponents
基于Pytorch肺部感染识别案例(采用ResNet网络结构)
35 is not a stumbling block in the career of programmers
Global and Chinese market of operational amplifier 2022-2028: Research Report on technology, participants, trends, market size and share
pytorch的Dataset的使用