始创于2000年 股票代码:831685
咨询热线:0371-60135900 注册有礼 登录
  • 挂牌上市企业
  • 60秒人工响应
  • 99.99%连通率
  • 7*24h人工
  • 故障100倍补偿
全部产品

忘记root密码怎么办?Windows平台下MYSQL破解root密码流程

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-----



分享到:
  • 您可能在找
  • 尊托云数北京公司:
  • 经营性ICP/ISP证:京B2-20150015
  • 尊托云数郑州公司:
  • 经营性ICP/ISP/IDC证:豫B1-20183354
  • 尊托云数南昌公司:
  • 经营性ICP/ISP证:赣B2-20080012
  • 服务器/云主机 24小时售后服务电话:0371-60135900
  • 虚拟主机/智能建站 24小时售后服务电话:0371-60135900
  • 网络版权侵权举报电话:0371-60135995
  • 警情提示:注意防范电信网络诈骗
  • 专注服务器托管19年
    扫扫关注-微信公众号
    0371-60135900
    Copyright© 1999-2023 ENKJ All Rights Reserved 地址:郑州市高新区翠竹街1号总部企业基地尊托云数大厦  法律顾问:河南三融律师事务所周跃、裴松龄律师  B1-20183354   京公网安备41019702002023号 
      0
     
     
     
     

    0371-60135900
    7*24小时客服服务热线

     
     


    http://www.vxiaotou.com