当前位置:网站首页>Error 1045 (28000) access denied for user 'root' @ 'localhost' solution
Error 1045 (28000) access denied for user 'root' @ 'localhost' solution
2022-07-29 07:15:00 【m0_ sixty-seven million three hundred and ninety-four thousand 】
The origin of things
The night before yesterday was fine , The next day, I turned on my computer and was about to start writing garbage code , It is found that the project startup report is wrong , Look at the , It is found that the database cannot be connected , I looked stunned , Only on the csdn Search the article of the boss , Finally, the problem was solved . The following process is the process of solving the problems that occur when I execute the boss tutorial . I am mysql Version as follows :mysql-8.0.27-winx64.
operation
One 、 New first cmd window , close mysql service

Two 、 Create a second cmd window ( Administrator permission open ), Skip permission validation
mysqld --console --skip-grant-tables --shared-memory

3、 ... and 、 Create a third cmd window ( Administrator permission open ), No password to enter mysql, And clear the password
notice Enter passowrd Love directly and ignore , Just go back
update user set authentication_string='' where user='root';

Four 、 Close the front cmd window ( Administrator permission open ), No password to enter mysql, And reset the password

Everything goes well ahead , When I want to change my password , I made a mistake again , Say my password is too simple , Make fun of ,“12345678” It's simple , Forget it , It can only be modified mysql The rules of .
Open configuration 
Find out policy It's medium 
Then change it to low-level
set global validate_password.policy=0;

Re execution mysql> show variables like “%validate%”; It is found that the modification is complete 
Finally, you can change the password , Open up 
Ah, this , An error again , My mind is broken . Finally, after checking other information , Found a new modification method .
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '12345678';

After the modification, you can log in normally
Reference blog
https://blog.csdn.net/m0_46278037/article/details/113923726spm=1001.2014.3001.5502
边栏推荐
- MySQL 高级(进阶) SQL 语句 (一)
- Junda technology | applicable to "riyueyuan" brand ups wechat cloud monitoring card
- 以太网接口介绍
- buck电路boot和ph引脚实测
- gin 参数验证
- WPF简单登录页面的完成案例
- Vagrant box cluster processing
- Variables and encryption in ansible
- Cvpr2021 | multi view stereo matching based on self supervised learning (cvpr2021)
- MVFuseNet:Improving End-to-End Object Detection and Motion Forecasting through Multi-View Fusion of
猜你喜欢

数组的子集不能累加出的最小正数

Revolution of game assets

Unity free element special effect recommendation

Decompilation of wechat applet

Improved pillar with fine grained feature for 3D object detection paper notes

后缀自动机(SAM)讲解 + Luogu p3804【模板】后缀自动机 (SAM)

Win11vmware turns on the virtual machine and restarts on the blue screen and the solution that cannot be started

最新百亿量化私募名单

OCR光学字符识别方法汇总

Student achievement ranking system based on C language design
随机推荐
JS 鸡生蛋与蛋生鸡问题,Object与Function究竟谁出现的更早?Function算不算Function的实例?
Flink real-time warehouse DWD layer (Kafka associated with MySQL lookup join) template code
【C语言刷LeetCode】67. 二进制求和(E)
MySQL advanced (Advanced) SQL statement (I)
【C语言刷LeetCode】2332. 坐上公交的最晚时间(M)
Guess the number / / generate a random number for the first time
Flink real time warehouse DWD layer (traffic domain) template code
Vscode remote debugging PHP solution through remotessh and Xdebug
外包干了3年,跳槽后转自动化测试工资是原来的2倍,秘诀原来是......
CAN&CANFD综合测试分析软件LKMaster与PCAN-Explorer 6分析软件的优势对比
Decompilation of wechat applet
如何使用gs_expansion扩展节点
Connecting PHP 7.4 to Oracle configuration on Windows
Flink real-time warehouse DWD layer (transaction domain - additional purchase dimension degradation processing) template code
Kubernetes (五) ---------部署 Kubernetes Dashboard
Vmware16 create virtual machine: win11 cannot be installed
WPF 界面布局必知基础
MVFuseNet:Improving End-to-End Object Detection and Motion Forecasting through Multi-View Fusion of
后缀自动机(SAM)讲解 + Luogu p3804【模板】后缀自动机 (SAM)
MutationObserver文档学习