zoukankan      html  css  js  c++  java
  • linux环境下mysql 5.7.1X 如何重置root密码

    1,vi  /etc/my.cnf
    [mysqld]下加入参数skip-grant-tables   保存退出。
    2,重启mysql

    1. [root@21yunwei src]# /etc/init.d/mysqld restart
    2. Shutting down MySQL.. [ OK ]
    3. Starting MySQL. [ OK ]

    3,登录mysql修改密码。通过mysql -uroot -p 直接回车空密码登录mysql后,采用update 修改mysq.user表:

    1. mysql> use mysql;
    2. Database changed
    3. mysql> update user set authentication_string=PASSWORD('123456') where User='root';
    4. Query OK, 1 row affected, 1 warning (0.01 sec)
    5. Rows matched: 1 Changed: 1 Warnings: 1
    6.  
    7. mysql> flush privileges;
    8. Query OK, 0 rows affected (0.00 sec)

    4,登录测试。
    编辑/etc/my.cnf注释或删除[mysqld]下加入的参数skip-grant-tables   保存退出后重启mysql,重新登录测试,mysql 5.7.1X的root密码破解重置成功。

  • 相关阅读:
    android progressbar 水平进度条
    jquery 下拉自动加载
    jquery ajax
    input 数字,字母汉字的限制方法(转帖)
    Jquery checkbox
    js运用6
    js运用5
    js运用4
    js运用3
    js运用2
  • 原文地址:https://www.cnblogs.com/yumo1627129/p/9455962.html
Copyright © 2011-2022 走看看