1.首先在C盘我们创建一个txt文档将其重命名为"mysql-init.txt",文档内容我们输入
update mysql.user set password=password('newpasswd') where user='root';
flush privileges; 注:其中 newpasswd 可以更改为您需要重置的Mysql密码
2.点击开始→运行→CMD,进入CMD命令行,首先输入 net stop mysql 停止数据库服务
然后进入Mysql安装目录下的bin目录,以下图片为Mysql安装目录在C:/Mysql/mysql Server5.1/bin
3.输入命令mysqld --init-file=C://mysql-init.txt 回车
4.密码重置成功,再次在CMD命令行中输入 net start mysql 启动数据库服务
补充: 数据库,mysql教程
查看更多关于mysql利用mysql.exe重置root密码的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://www.haodehen.cn/did253727