当前位置:网站首页>Navicat cannot connect to mysql super detailed processing method
Navicat cannot connect to mysql super detailed processing method
2022-07-30 06:05:00 【m0_67393295】

Error reason:
The local IP (xxx.xxx.xxx.xxx) does not have permission to access the remote database.
Solution:
This paragraph is a pure solution, explained below
First open the administrator window, then directly look at the image below 
The code you need to use is placed here for easy access
1.mysql -uroot -p
2.use mysql;
3.update user set host = '%' where user = 'root';
4.flush privileges;
5.select user,host from user;
The following is the detailed process
1. Open the administrator window

2. Log in to the mysql server
Enter this statement: mysql -uroot -p, then enter your password 
3. Use mysql database
Enter this statement: use mysql;

4. Update user permissions
Enter this statement: update user set host = '%' where user = 'root';

5. Refresh permissions, this must have
Enter this statement: flush privileges;

6. Check if it is successful
Enter this statement: select user,host from user;
If root, it corresponds to the percent sign (%)
Congratulations on your success

Let me introduce myself first. The editor graduated from Shanghai Jiaotong University in 2013. I worked in a small company and went to big factories such as Huawei and OPPO. I joined Alibaba in 2018, until now.I know that most junior and intermediate java engineers want to upgrade their skills, they often need to explore their own growth or sign up to study, but for training institutions, the tuition fee is nearly 10,000 yuan, which is really stressful.Self-learning that is not systematic is very inefficient and lengthy, and it is easy to hit the ceiling and the technology stops.Therefore, I collected a "full set of learning materials for java development" for everyone. The original intention is also very simple. I hope to help friends who want to learn by themselves but don't know where to start, and at the same time reduce everyone's burden.Add the business card below to get a full set of learning materials
边栏推荐
猜你喜欢
随机推荐
leetcode刷题
839. 模拟堆
ClickHouse data insert, update and delete operations SQL
cnpm installation steps
108. 将有序数组转换为二叉搜索树
An old programmer's summary review of 2020, how to become more awesome in 2021
Detailed MySQL-Explain
使用DataEase开源工具制作一个高质量的数据大屏
[其他] DS5
cmd(命令行)操作或连接mysql数据库,以及创建数据库与表
MySQL索引从入门到深入学习
postman 请求 post 调用 传 复合 json数据
面试题 17.13. 恢复空格(字典树)
Basic syntax of MySQL DDL and DML and DQL
【小程序项目开发 -- 京东商城】uni-app 商品分类页面(下)
腾讯面试居然跟我扯了半小时的CountDownLatch
How is crawler data collected and organized?
【Koltin Flow(一)】五种创建flow的方式
2022年SQL经典面试题总结(带解析)
破纪录者(Google Kickstart2020 Round D Problem A)



![[Redis Master Cultivation Road] Jedis - the basic use of Jedis](/img/e3/0c6efd03432a01f857796f0bf648ef.png)


![[Mysql] DATEDIFF function](/img/cd/7d19e668701cdd5542b6e43f4c2ad4.png)


