当前位置:网站首页>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
- 解决npm ERR! Unexpected end of JSON input while parsing near问题
- App automated testing appium Tutorial Part 1 - advanced supplementary content
- 【学习笔记】差分约束
- 【转载】STM32 GPIO类型
- [introduction to SQL in 10 days] day5+6 consolidated table
- B_ QuRT_ User_ Guide(30)
- Loss loss function
- Redis deployment under Linux & redis startup
- 利尔达低代码数据大屏,铲平数据应用开发门槛
猜你喜欢

About using font icons in placeholder

In flood fighting and disaster relief, the city donated 100000 yuan of love materials to help Yingde

PMP从报考到拿证基本操作,了解PMP必看篇

Discussion on the application of GIS 3D system in mining industry

Infinite penetration test

关于如何在placeholder中使用字体图标

B_QuRT_User_Guide(27)

罗氏线圈工作原理

PLSQL installation under Windows

Installing mysql5.7 under Windows
随机推荐
[learning notes] matroid
A - deep sea exploration
Installing mysql5.7 under Windows
Force buckle 1024 video splicing
微内核Zephyr获众多厂家支持!
【Go ~ 0到1 】 第二天 6月25 Switch语句,数组的声明与遍历
Sword finger offer 03 Duplicate number in array
IO error in Oracle11g: got minus one from a read call
罗氏线圈工作原理
Set the icon for the title section of the page
In flood fighting and disaster relief, the city donated 100000 yuan of love materials to help Yingde
Robot Rapping Results Report
Login common test case
块级元素上下左右居中的两个小技巧
ffmpeg推流报错Failed to update header with correct duration.
【学习笔记】拟阵
DB
Set the encoding of CMD to UTF-8
RAC enable archive log
抖音服務器帶寬有多大,才能供上億人同時刷?