当前位置:网站首页>ERROR 1045 (28000) Access denied for user 'root'@'localhost'Solution
ERROR 1045 (28000) Access denied for user 'root'@'localhost'Solution
2022-07-30 19:40:00 【bsegebr】
Origin of event
The night before yesterday was fine. When I turned on the computer the next day and was about to start writing junk code, I found that the project started reporting an error. I looked at it and found that the database could not be connected. I was confused and could only search on csdn.Guy's article, finally solved the problem.The following process is the process of solving the problems that occurred when I implemented the Daxie tutorial.My mysql version is as follows: mysql-8.0.27-winx64.
Action
First, create the first cmd window and close the mysql service
Second, create a second cmd window (open with administrator permissions), skip permission verification
mysqld --console --skip-grant-tables --shared-memory
Third, create a third cmd window (open with administrator privileges), enter mysql without a password, and clear the password
When you see Enter passowrd, you just ignore it, just press Enter
update user set authentication_string='' where user='root';
Fourth, close the previous cmd window (open with administrator privileges), enter mysql without a password, and reset the password
Everything went well before, when I want to change the password, gave me an error again, saying that my password is too simple, just kidding, "12345678" is still simple, forget it, only the rules of mysql can be modified.
Open configuration
found the policy to be medium
Then change it to low-level
set global validate_password.policy=0;
execute mysql again> show variables like “%validate%”; found the modification completed
Finally, you can change the password,Start
Ah this, another error is reported, my mind is brokenah.Finally, after checking other information, I found a new modification method.
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '12345678';
After modification, you can log in normally
Reference Blog
https://blog.csdn.net/m0_46278037/article/details/113923726spm=1001.2014.3001.5502
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 copy of "a complete 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
边栏推荐
- 【MindSpore】用coco2017训练Model_zoo上的 yolov4,迭代了两千多batch_size之后报错,大佬们帮忙看看。
- - daily a LeetCode 】 【 191. A number of 1
- 架构师如何成长
- MindSpore:【JupyterLab】按照新手教程训练时报错
- Is the iPhone really thirteen incense?The two generations of products are completely compared, perhaps the previous generation is more worth buying
- MySQL数据库————视图和索引
- 牛客网——华为题库(100~108)
- 【刷题篇】计算质数
- Tensorflow2.0 confusion matrix does not match printing accuracy
- Golang logging library zerolog use record
猜你喜欢
Google's AlphaFold claims to have predicted almost every protein structure on Earth
MySQL数据库主从配置
HCIP --- 企业网的三层架构
阿里面试这些微服务还不会?那还是别去了,基本等通知
部分分类网络性能对比
谷歌AlphaFold近日宣称预测出地球上几乎所有蛋白质结构
Download Win11 how to change the default path?Download Win11 change the default path method
【Node实现数据加密】
Alibaba Cloud Martial Arts Headline Event Sharing
golang日志库zerolog使用记录
随机推荐
How architects grow
win2003下FTP服务器如何搭建
[hbuilder] cannot run some projects, open the terminal and cannot enter commands
Spark学习:编译Spark项目时遇到的报错
musicApp 的.eslintrc.js
Spark学习:用spark实现ETL
Scala学习:类和对象
VBA batch import Excel data into Access database
数据库索引:索引并不是万能药
LeetCode 0952.按公因数计算最大组件大小:建图 / 并查集
VBA connects Access database and Excel
电脑死机的时候,发生了什么?
青蛙跳台阶(递归和非递归)-------小乐乐走台阶
Cesium加载离线地图和离线地形
【网站放大镜效果】两种方式实现
解决终极bug,项目最终能顺利部署上线。
MindSpore:【JupyterLab】查看数据时报错
MySQL函数(经典收藏)
Start foreground Activity
055 c# print