mysql启动参数 skip-grant-tables

非常有用的mysql启动参数—— --skip-grant-tables。 顾名思义,就是在启动mysql时不启动grant-tables,授权表。有什么用呢?当然是忘记管理员密码后有用。

 在mysql.cnf 配置文件中加上skip-grant-tables,然后重启mysql服务

    操作方法:
    1、mysql.cnf 配置文件中加上skip-grant-tables

 2.  重启mysql服务 , sudo service mysql restart

 3. mysql 直接连接进入客户端
     

原文地址:https://www.cnblogs.com/loveyouyou616/p/5583590.html