安装 FastAdmin 时忘记 MySQL 密码怎么办?

安装 FastAdmin 时忘记 MySQL 密码怎么办?

给 MySQL 启动时加上 skip-grant-tables 参数,然后随便使用用户名都可以进入 MySQL。

接着就可以使用 命令改了 root 的密码。

具体如下:

mysqld_safe --skip-grant-tables &

use mysql;
update user set password=password('root') where user='root';

原文地址:https://www.cnblogs.com/F4NNIU/p/10979733.html