当前位置:网站首页>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

边栏推荐
- 安装nrm后,使用nrm命令报错internal/validators.js:124 throw new ERR_INVALID_ARG_TYPE(name, ‘string‘, value)
- redis02——一篇终结redis的五种数据类型操作命令(可学习、复习、面试、收藏备用)
- 与普通探头相比,差分探头有哪些优点
- VMware Workstation related issues
- Sword finger offer 03 Duplicate number in array
- Superimposed ladder diagram and line diagram and merged line diagram and needle diagram
- Oracle view all tablespaces in the current library
- 40多岁的人如何配置年金险?哪款产品比较合适?
- B_ QuRT_ User_ Guide(29)
- Super Jumping! Jumping! Jumping!
猜你喜欢
随机推荐
JS rounding tips
App automated testing appium Tutorial Part 1 - advanced supplementary content
After installing NRM, the internal/validators js:124 throw new ERR_ INVALID_ ARG_ TYPE(name, ‘string‘, value)
Basic twelve style classes for duilib
WasmEdge 0.10.0 发布!全新的插件扩展机制、Socket API 增强、LLVM 14 支持
[learning notes] search
为什么函数模板没有偏特化?
[go ~ 0 to 1] the third day June 27 slice, map and function
Super Jumping! Jumping! Jumping!
A - deep sea exploration
TCP那点事
Oracle view tablespace usage
【.NET6】gRPC服务端和客户端开发案例,以及minimal API服务、gRPC服务和传统webapi服务的访问效率大对决
yaml json
Map. ToCharArray( ),Map. getOrDefault(). Map. charAt()
【转载】STM32 GPIO类型
【云原生 | Kubernetes篇】深入了解Pod(六)
The preliminary round of the sixth season of 2022 perfect children's model Foshan competition area came to a successful conclusion
叠加阶梯图和线图及合并线图和针状图
Discussion on the application of GIS 3D system in mining industry






![[learning notes] shortest path + spanning tree](/img/38/42b7e321389e3a47304fca5c37a2cf.png)

