Windows平台下MYSQL破解root密码(忘记root密码的解决方法)
来源:互联网 发布:mac的finder边栏没了 编辑:程序博客网 时间:2024/06/07 12:49
Author:skate
Time:2010-4-23
Windows平台下MYSQL破解root密码(忘记root密码的解决方法)
1, 停止MYSQL服务,CMD打开DOS窗口,输入 net stop mysql
C:/Documents and Settings/skate_db>net stop mysql
MySQL 服务正在停止.
MySQL 服务已成功停止。
2, 在CMD命令行窗口,进入MYSQL安装目录
C:/Documents and Settings/skate_db>cd C:/Program Files/MySQL/MySQL Server 5.0/bin
3, 进入mysql安全模式,即当mysql起来后,不用输入密码就能进入数据库。
C:/Program Files/MySQL/MySQL Server 5.0/bin>mysqld-nt --skip-grant-tables
100423 10:27:27 [Warning] Changed limits: max_open_files: 2048 max_connections:
800 table_cache: 619
4, 重新打开一个CMD命令行窗口,输入mysql –u root -p,使用空密码的方式登录MySQL(不用输入密码,直接按回车)
C:/Documents and Settings/skate_db>mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or /g.
Your MySQL connection id is 1 to server version: 5.0.22-community-nt
Type 'help;' or '/h' for help. Type '/c' to clear the buffer.
mysql>
5, 输入以下命令开始修改root用户的密码(注意:命令中mysql.user中间有个“点”)
命令:mysql> update mysql.user set password=PASSWORD('新密码') where User='root';
mysql> update mysql.user set password=password('root') where user='root';
Query OK, 2 rows affected (0.06 sec)
Rows matched: 2 Changed: 2 Warnings: 0
6, 保存配置,刷新权限表
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql>
7, 退出
mysql> quit
这样MYSQL超级管理员账号 ROOT已经重新设置好了,因为心在mysql还是运行在安全模式下,所以在windows的任务管理器里kill掉mysql-nt.exe 这个进程,重新启动mysql,用新设置的root密码登录。
C:/Documents and Settings/skate_db>net start mysql
MySQL 服务已经启动成功。
C:/Documents and Settings/skate_db>mysql -u root -p
Enter password: ****
Welcome to the MySQL monitor. Commands end with ; or /g.
Your MySQL connection id is 2 to server version: 5.0.22-community-nt
Type 'help;' or '/h' for help. Type '/c' to clear the buffer.
mysql>
-----end-----
- Windows平台下MYSQL破解root密码(忘记root密码的解决方法)
- Windows下mysql忘记root密码破解
- windows下mysql忘记root密码解决方法
- Windows下mysql忘记root密码解决方法
- mysql忘记root密码windows下解决方法
- Windows下忘记MySQL root密码解决方法
- windows mysql忘记root密码的解决方法
- MySQL在Windows平台下忘记root密码的解决办法
- MySQL在Windows平台下忘记root密码的解决办法
- Windows下mysql忘记root密码的解决方法
- windows下mysql忘记root密码的解决方法
- windows下mysql忘记root密码的解决方法
- windows下mysql忘记root密码的解决方法
- windows下mysql忘记root密码的解决方法
- windows下mysql忘记root密码的解决方法
- windows下mysql忘记root密码的解决方法
- windows下mysql忘记root密码的解决方法
- windows下mysql忘记root密码的解决方法
- Silverlight 3 RIA服务编程中异步域操作
- ActiveX中调用JavaScript
- buaa_jsc的专栏
- ABI Specifications 相关链接
- 【zz】将成员函数指针强制转换成void指针
- Windows平台下MYSQL破解root密码(忘记root密码的解决方法)
- IT职场:外企面试官最爱提的问题TOP10
- 爱护动物,保护环境
- 读《绝不是靠运气》
- 在win7下使用zend studio 7.1.0,解决汉化、中文乱码、js等问题
- 【zz】C语言中的空指针、空指针常量、NULL & 0
- 【zz】void指针
- is 运算符(FLEX)
- 一个程序员的成长的六个阶段(转