当前位置:网站首页>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
边栏推荐
- MySQl数据库————DQL数据查询语言
- MindSpore:【模型训练】【mindinsight】timeline的时间和实际用时相差很远
- ResNet18-实现图像分类
- Google's AlphaFold claims to have predicted almost every protein structure on Earth
- VBA runtime error '-2147217900 (80040e14): Automation error
- Start background services across processes
- JS提升:Promise中reject与then之间的关系
- VBA批量将Excel数据导入Access数据库
- 看完《二舅》,我更内耗了
- PostgreSQL 14.4如何安装使用
猜你喜欢

VBA runtime error '-2147217900 (80040e14): Automation error

NXP IMX8QXP replacement DDR model operation process

MySQL slow query optimization

【PyTorchVideo教程01】快速实现视频动作识别
![[PyTorchVideo Tutorial 01] Quickly implement video action recognition](/img/1a/696c5722bb94fabd688a8714ae2e8c.png)
[PyTorchVideo Tutorial 01] Quickly implement video action recognition

VBA batch import Excel data into Access database

MindSpore:对image作normalize的目的是什么?

MySQL数据库————视图和索引

Delay queue optimization (2)

Perfectly Clear QuickDesk & QuickServer图像校正优化工具
随机推荐
The advanced version of the Niu Ke brushing series (team competition, sorting subsequences, inverting strings, deleting common characters, repairing pastures)
Range.CopyFromRecordset 方法 (Excel)
vxe-table实现复选框鼠标拖动选中
How to build FTP server under win2003
【flink】报错整理 Could not instantiate the executor. Make sure a planner module is on the classpath
MindSpore:Cifar10Dataset‘s num_workers=8, this value is not within the required range of [1, cpu_thr
看完《二舅》,我更内耗了
在华为云,见证迷你世界的神奇觉醒
OneFlow source code analysis: Op, Kernel and interpreter
Alibaba Cloud Martial Arts Headline Event Sharing
云数据库和本地数据库有什么区别?
MySQL函数(经典收藏)
MySQL六脉神剑,SQL通关大总结
Linux下载安装mysql5.7版本教程最全详解
第一次进入小程序判断
什么是 RESTful API?
Perfectly Clear QuickDesk & QuickServer图像校正优化工具
Scala学习:breakable
MySQL数据库 ---MySQL表的增删改查(进阶)
Another company interview