当前位置:网站首页>mysql忘记密码重置
mysql忘记密码重置
2022-07-16 20:55:00 【weixin_51202501】
mysql 密码修改
1:mysqld --console --skip-grant-tables --shared-memory
此时该命令行窗口就不能再输入内容了****注意不要关闭该窗口
2:再打开一个新的cmd,无密码登录MySQL,输入登录命令:
在mysql bin目录下输入 mysql -u root -p
显示要你输入密码时直接enter,不必输入
3:密码置为空,命令如下:
(1)use mysql
(2)update user set authentication_string=‘’ where user=‘root’;
******注意,一定要置空,千万不要尝试在该步骤就填入密码
在该命令窗口输入 quit 退出
4:关闭以-console --skip-grant-tables --shared-memory 启动的MySQL服务(有的可能在退出的时候自动关闭了)
5:再打开一个命令框,输入:net start mysql 启动MySQL服务。
6:步骤4密码已经置空,所以无密码状态登录MySQL,输入登录命令:mysql -u root -p
7:使用下语句更改密码 ALTER USER ‘root’@‘localhost’ IDENTIFIED WITH mysql_native_password BY ‘新密码’;
8:验证更改后密码正确登录
输入quit,退出当前登录,输入登录命令:mysql -u root -p
输入密码新设置的密码,成功登录,到此,重置密码结束。
边栏推荐
- 配置文件加密
- PMP practice once a day | don't get lost in the exam -7.16
- How to deal with time series event data? [doctoral thesis of Munich University of technology] neural time series point process (ntpp): continuous time event data modeling
- 远程购买商品Solidity合约
- 【大型电商项目开发】缓存-分布式锁-Redisson简洁&整合-lock锁-Redisson解决死锁-读写锁-闭锁-信号量-44
- 20220714给AIO-3568J适配OpenHarmony-v3.1-beta(编译Buildroot)
- Professor Liu Xiaole: my indissoluble relationship with bioinformatics
- Two stack implementation queue and two queue implementation stack (JS)
- Leetcode48. rotate image
- Original Rexroth proportional valve 4wrba10w64-2x/g24n9z4/m
猜你喜欢

性能测试中问题反思和心得

C语言自定义类型:结构体,枚举,联合

pytorch的安装(非常详细)

三维点云课程(一)——点云基础介绍

Error: the solution of diamond operator is not supported in -source 1.6

Solution to Chinese garbled code in response results of burpsuite tool

原装rexroth比例阀4WRBA10W64-2X/G24N9Z4/M

20220714 adapt openharmony-v3.1-beta to aio-3568j (compile builderoot)

About products | how to plan products?
![[C #] positive sequence, reverse sequence, maximum value, minimum value and average value](/img/a8/253bbae10b4d02c74a119d60ba10ad.png)
[C #] positive sequence, reverse sequence, maximum value, minimum value and average value
随机推荐
Sklearn linear regression completes the fitting of multiple term function and sine function
Kaggle file download (weights, inference files...)
Nature Aging | 激活FOXM1基因人类寿命或翻倍
Modify server password
记一次蚂蚁金服四面遭虐,面试水太深,过河的渡船你造好了吗?
Logical loopholes in security testing
单元测试界的高富帅,Pytest框架 (完) 测试报告篇
[play with es] es batch / full import data
NPM installation tutorial
Bigdata operation week 14 & 15
企业数字化转型,为何SaaS模式如此重要?
Configure SSH login for Huawei switches
Germany Rexroth proportional valve 4wrpeh6c5b40l-3x/m/24f1
ADB常用入门指令
多租户SaaS的数据库设计模式
3D point cloud course (IV) -- clustering and model fitting
3D point cloud course (II) -- nearest neighbor problem
npm安装教程
No cl.exe solution found
[C #] positive sequence, reverse sequence, maximum value, minimum value and average value