mysql修改用户密码的方法和mysql忘记密码的解决方法
时间:2024-01-23 10:07:06
修改密码:
//选择数据库
use mysql;
//修改密码
update user set password=password('新密码') where user='root';
//立即生效
flush privileges
忘记管理员密码:
在my.ini的[mysqld]字段下面加入:
skip-grant-tables
重启mysql服务,这时的mysql不需要密码即可登录数据库
然后进入mysql
use mysql;update user set password=password('新密码') where user='root';
flush privileges
运行之后最后去掉my.ini中的skip-grant-tables,重启mysql即可。
标签:忘记密码
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
详解如何用Golang处理每分钟100万个请求
2023-10-12 20:30:30
![](https://img.aspxhome.com/file/2023/8/103038_0s.webp)
Python PaddleGAN实现调整照片人物年龄
2023-09-28 05:48:14
![](https://img.aspxhome.com/file/2023/2/90612_0s.png)
CSS属性behavior的语法及介绍
2010-01-13 12:40:00
深入浅析ImageMagick命令执行漏洞
2022-07-21 11:50:46
![](https://img.aspxhome.com/file/2023/0/70870_0s.png)
pythonfor循环中range与len区别
2023-06-22 03:17:10
![](https://img.aspxhome.com/file/2023/2/115022_0s.png)
mysql 8.0.22 winx64安装配置方法图文教程
2024-01-16 01:03:20
![](https://img.aspxhome.com/file/2023/1/75651_0s.png)
用ASP在线创建Word与Excel文档
2008-07-20 19:17:00
python导入不同目录下的自定义模块过程解析
2022-11-08 16:05:47
![](https://img.aspxhome.com/file/2023/7/86537_0s.png)
python编程线性回归代码示例
2021-06-07 07:53:16
![](https://img.aspxhome.com/file/2023/2/95722_0s.png)
Python Web App开发Dockerfiles编写示例
2023-02-01 12:47:19
Python中的pprint打印模块
2023-04-22 12:11:18
Python3的高阶函数map,reduce,filter的示例详解
2024-01-02 21:16:19
Asp无组件上传进度条解决方案
2010-04-24 16:01:00
PHP生成网站桌面快捷方式代码分享
2023-06-16 02:54:17
在Yii框架中使用PHP模板引擎Twig的例子
2023-11-14 11:30:30
如何通过shell脚本自动生成vue文件详解
2024-05-22 10:28:35
![](https://img.aspxhome.com/file/2023/1/123701_0s.jpg)
Python Flask入门
2023-11-03 17:00:49
![](https://img.aspxhome.com/file/2023/8/85258_0s.png)
php 的反射详解及示例代码
2024-06-05 09:46:28
如何将python代码打包成pip包(可以pip install)
2021-08-23 21:38:10
关于mysql调用新手们常犯的11个错误总结
2024-01-22 15:21:45