当前位置:网站首页>Navicat error: 1045-Access denied for user [email protected](using passwordYES)
Navicat error: 1045-Access denied for user [email protected](using passwordYES)
2022-07-30 00:34:00 【m0_67393157】
Foreword:
The thing is like this, yesterday I was debugging an oython project given by my mentor. This project has no documentation, so I need to match and create the database information myself, so I connected this project to my local database., to debug. After I connected to the database, I ran the Flask project, but the database could no longer be opened, and an error was displayed:
1045-Access denied for user [email protected](using password:YES).In order to let friends who encounter the same problem avoid this pit, I will record the process of solving it.
Body:
Anyone who encounters this problem on the terminal has a high probability of forgetting the password, but when Navicat cannot open the database, there is a high probability that something went wrong, and I don't know the details, so I solved it like this:
First open the terminal as administrator, then open the database:

Then enter the command: mysql -u root -p

Type your password again.Then enter a command to change your current password:
Ps: This place must be tried!!!At first, I didn’t believe that changing the password would be enough. I felt that this problem should be solved from the root cause, but it turns out that changing the password is really effective. I can log in with Navicat after changing the password.
The command to change the password in versions before mysql8.0:
update mysql.user set authentication_string=password("new password") where user="root";The command to change the password in versions after mysql8.0:
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'new password'
How to see what version of mysql is, you can check it from Navicat:

Of course, if the command according to the corresponding version does not work, try another command.
After entering the command, exit mysql and log in with the new password once:

If it doesn't work, you need to look at other bloggers' articles, because this error is really sudden, and the solution is also very sudden...
Summary:
When encountering this kind of problem, you can start with the simplest way to change the password. If changing the database password can't solve it, go to find a further method, at least one possibility is ruled out.If you have a better solution, please leave a comment below or send me a private message, thank you very much!???
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
边栏推荐
猜你喜欢

Worthington弹性蛋白酶&透明质酸酶简介

Go日志库——logrus

STM32 - OLED display experiment

测试员容易陷入的9大误区

How many ways does Selenium upload files?I don't believe you have me

Baidu Intelligent Cloud Zhangmiao: Detailed explanation of enterprise-level seven-layer load balancing open source software BFE

谷歌浏览器(google)设置翻译中文,翻译选项不生效或没有弹出翻译选项

更换可执行文件glibc版本的某一次挣扎

消息中间件解析 | 如何正确理解软件应用系统中关于系统通信的那些事?

From the perspective: the interviewer interview function test engineer mainly inspects what ability?
随机推荐
How to increase account weight?3 ways to operate your own media to help you get more revenue
servlet执行详解
排序相关应用
Worthington解离酶:中性蛋白酶(分散酶)详情解析
Docker installs redis cluster (including deployment script)
QTableWidget使用示例
测试员容易陷入的9大误区
Go日志库——logrus
Recurrent Neural Network (RNN)
Toutiao We-Media Operation: How to Gain 500+ Fans in Toutiao Today?
从尾到头打印链表
Since the media increase play a short video?From the three aspects
Navicat报错:1045-Access denied for user [email protected](using passwordYES)
CNN的粗浅理解
【励志】科比精神
机器人的运动范围
Codeforces Round #805 (Div. 3) Summary
【Incubator DAY18】Interesting exchange【Simulation】【Math】
ZLMediaKit源码分析 - NotifyCenter
Laravel 预防 SQL 注入