Home > Database > Mysql Tutorial > Mysql 密码破解_MySQL

Mysql 密码破解_MySQL

WBOY
Release: 2016-06-01 13:08:37
Original
984 people have browsed it

Windows修改

1,停止MYSQL服务,CMD打开DOS窗口,输入net stop mysql
2,在CMD命令行窗口,进入MYSQL安装目录比如E:/ProgramFiles/MySQL/MySQL Server 5.0/bin
示范命令:
输入e:回车,
输入cd"E:/Program Files/MySQL/MySQL Server 5.0/bin"
注意双引号也要输入,这样就可以进入Mysql安装目录了.
3,进入mysql安全模式,即当mysql起来后,不用输入密码就能进入数据库。
命令为:mysqld --skip-grant-tables
4,重新打开一个CMD命令行窗口,输入mysql-uroot -p,使用空密码的方式登录MySQL(不用输入密码,直接按回车)
5,输入以下命令开始修改root用户的密码(注意:命令中mysql.user中间有个“点”)
mysql> update mysql.user set password=PASSWORD('新密码')where User='root';
6,刷新权限表
mysql> flush privileges;
7,退出
mysql> quit
这样MYSQL超级管理员账号ROOT已经重新设置好了,接下来在任务管理器里结束掉mysql-nt.exe这个进程,重新启动MYSQL即可!(也可以直接重新启动服务器)
MYSQL重新启动后,就可以用新设置的ROOT密码登陆MYSQL了!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template