码迷,mamicode.com
首页 > 数据库 > 详细

mysql破解root用户密码总结

时间:2016-12-17 14:30:29      阅读:217      评论:0      收藏:0      [点我收藏+]

标签:tab   使用   color   通过   权限   pass   bsp   style   use   

 


方法一:


1、
  /etc/my.cnf
  在[mysqld]段中加入
  skip-grant-table
2、
  重启mysql
3、
  直接mysql登录
4、
  通过修改权限表方式修改mysql密码(update)

  update mysql.user set password=password(‘xxxx‘) where user=‘root‘and host=‘localhost‘;
5、
  去除my.cnf中skip-grant-table
6、
  重启mysql
7、
  使用新密码登录

 

方法二:


  窗口1:
    1、停止mysql
    2、mysqld_safe --skip-grant-table
  窗口2:
    1、直接mysql进入
      mysql> update mysql.user set password=password(‘123456‘) where user=‘root‘ and host=‘localhost‘;
      mysql> flush privileges;

  窗口1:
    启动mysql



mysql破解root用户密码总结

标签:tab   使用   color   通过   权限   pass   bsp   style   use   

原文地址:http://www.cnblogs.com/fanxuanhui/p/6189546.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!