当前位置:网站首页>ERROR 1045 (28000) Access denied for user 'root'@'localhost'Solution
ERROR 1045 (28000) Access denied for user 'root'@'localhost'Solution
2022-08-02 06:09:00 【m0_67393295】
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, I can only modify the rules of mysql.
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 "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
边栏推荐
- MySql字符串拆分实现split功能(字段分割转列、转行)
- Detailed explanation of AMQP protocol
- 公司不重视软件测试,新来的阿里P8给我们撰写了测试用例编写规范
- H5接入支付流程-微信支付&支付宝支付
- MySQL如何对SQL做prepare预处理(解决IN查询SQL预处理仅能查询出一条记录的问题)
- How to quickly delete the compressed package password?
- 转:张五常:比知识更重要的,是思维方式
- 12个MySQL慢查询的原因分析
- 21天学习挑战赛安排
- [QNX Hypervisor 2.2用户手册]9.17 tolerance
猜你喜欢
一线大厂软件测试流程(思维导图)详解
MYSQL unique constraint
来自雪域高原的馈赠——大凉山高原生态糖心苹果
MySQL 5.7 detailed download, installation and configuration tutorial
UE4 创建开始游戏界面UI
MySQL 8.0.28 version installation and configuration method graphic tutorial
公司不重视软件测试,新来的阿里P8给我们撰写了测试用例编写规范
apifox介绍及使用(1)。
MySQL 游标
【云原生】什么是CI/CD? | CI/CD 带来的好处
随机推荐
apifox介绍及使用(1)。
pg数据库报错问题,有懂的吗
12个MySQL慢查询的原因分析
Digicert EV证书签名后出现“证书对于请求用法无效”的解决方案
一线大厂软件测试流程(思维导图)详解
MySQL String Concatenation - Various String Concatenation Practical Cases
navicat无法连接mysql超详细处理方法
系统(层次)聚类
CAN光端机解决泰和安TX3016C消防主机长距离联网问题 实现CAN与光纤之间的双向数据智能转换
MySQL 5.7详细下载安装配置教程
MySQL 8.0.28 version installation and configuration method graphic tutorial
Liquidated damages are too high"
MySQL 5.7 detailed download, installation and configuration tutorial
MySQL 的 limit 分页查询及性能问题
MySQL 用户授权
UE4 蓝图实现AI随机移动
Mysql实现乐观锁
matlab simulink 飞机飞行状态控制
UE4 创建开始游戏界面UI
递归实现指数型枚举(DAY 91)