当前位置:网站首页>Mysql8.0 forgot the root password
Mysql8.0 forgot the root password
2022-06-28 08:33:00 【Fire founder】
1、 edit mysql The configuration file :vim /etc/my.cnf, add to skip-grant-table( Skip table permission verification )
After the modification esc :wq! Save and exit .
2、 restart mysql service
systemctl restart mysqld
3、 Refresh permission table :flush privileges;
flush privileges;
4、mysql Sign in :mysql -uroot -p( No password required )
5、 Password reset
## The first root Your old password becomes empty
use mysql;
update user set authentication_string='' where user='root';
## Then reset the new password
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '@Zcw140619';
flush privileges; ## Refresh the permissions again
6、 Edit again mysql The configuration file vim /etc/my.cnf, Delete or comment skip-grant-table
7、 Restart again mysql service
systemctl restart mysqld
8、 Using the new root Whether the password login verification is modified successfully
mysql -uroot -p New password
9、 Successfully logged in
边栏推荐
- Anniversary party
- Dell r730 server startup error: [xxx] USB 1-1-port4: disabled by hub (EMI?), re-enabling...
- 【学习笔记】差分约束
- 为什么函数模板没有偏特化?
- Redis02 -- an operation command of five data types for ending redis (it can be learned, reviewed, interviewed and collected for backup)
- About using font icons in placeholder
- AI首席架构师8-AICA-高翔 《深入理解和实践飞桨2.0》
- Oracle RAC -- understanding of VIP
- Set<String>
- Modifying the SSH default port when installing Oracle RAC makes CRS unable to install
猜你喜欢
DB
AI首席架构师8-AICA-高翔 《深入理解和实践飞桨2.0》
B_ QuRT_ User_ Guide(28)
关于如何在placeholder中使用字体图标
VMware Workstation related issues
Discussion on the application of GIS 3D system in mining industry
抖音服务器带宽有多大,才能供上亿人同时刷?
叠加阶梯图和线图及合并线图和针状图
App automated testing appium tutorial 2 - ADB command
爱分析发布《2022爱分析 · IT运维厂商全景报告》 安超云强势入选!
随机推荐
Selenium+chromedriver cannot open Google browser page
Introduction, compilation, installation and deployment of Doris learning notes
In flood fighting and disaster relief, the city donated 100000 yuan of love materials to help Yingde
Loss损失函数
【.NET6】gRPC服务端和客户端开发案例,以及minimal API服务、gRPC服务和传统webapi服务的访问效率大对决
Robot Rapping Results Report
Case tool
Infinite penetration test
Chenglian premium products donated love materials for flood fighting and disaster relief to Yingde
Not so Mobile
【力扣10天SQL入门】Day5+6 合并表
The preliminary round of the sixth season of 2022 perfect children's model Foshan competition area came to a successful conclusion
Anniversary party
爱分析发布《2022爱分析 · IT运维厂商全景报告》 安超云强势入选!
PMP从报考到拿证基本操作,了解PMP必看篇
Two tips for block level elements
【学习笔记】线性基
B_ QuRT_ User_ Guide(30)
Cloudcompare & PCL point cloud SVD decomposition
关于如何在placeholder中使用字体图标