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

边栏推荐
- [go ~ 0 to 1] the next day, June 25, switch statement, array declaration and traversal
- The 6th smart home Asia 2022 will be held in Shanghai in October
- Reverse mapping of anonymous pages
- Cloudcompare & PCL point cloud SVD decomposition
- A - 深海探险
- Anniversary party
- 【Go ~ 0到1 】 第三天 6月27 slice,map 与 函数
- In flood fighting and disaster relief, the city donated 100000 yuan of love materials to help Yingde
- cuda和cudnn和tensorrt的理解
- Dell r730 server startup error: [xxx] USB 1-1-port4: disabled by hub (EMI?), re-enabling...
猜你喜欢

找合适的PMP机构只需2步搞定,一查二问

B_QuRT_User_Guide(26)

第六届智能家居亚洲峰会暨精品展(Smart Home Asia 2022)将于10月在沪召开

Solution: selenium common. exceptions. WebDriverException: Message: ‘chromedriver‘ execu

VMware Workstation related issues

Wasmedge 0.10.0 release! New plug-in extension mechanism, socket API enhancement, llvm 14 support

设置cmd的编码为utf-8

Selenium+chromedriver cannot open Google browser page

Superimposed ladder diagram and line diagram and merged line diagram and needle diagram

安装nrm后,使用nrm命令报错internal/validators.js:124 throw new ERR_INVALID_ARG_TYPE(name, ‘string‘, value)
随机推荐
On the solution of insufficient swap partition
Introduction, compilation, installation and deployment of Doris learning notes
PLSQL installation under Windows
Solve NPM err! Unexpected end of JSON input while parsing near
Little artist huangxinyang was invited to participate in the Wuhan station of children's unit of Paris Fashion Week
redis02——一篇终结redis的五种数据类型操作命令(可学习、复习、面试、收藏备用)
【转载】STM32 GPIO类型
B_QuRT_User_Guide(28)
【力扣10天SQL入门】Day4 组合查询 & 指定选取
CloudCompare&PCL 点云裁剪(基于封闭曲面或多边形)
js运算符的优先级
Tree
【学习笔记】搜索
Wasmedge 0.10.0 release! New plug-in extension mechanism, socket API enhancement, llvm 14 support
Two tips for block level elements
B_QuRT_User_Guide(27)
隐私计算FATE-----离线预测
Kubernetes notes and the latest k3s installation introduction
How do people over 40 allocate annuity insurance? Which product is more suitable?
Loss loss function