Home > Database > Mysql Tutorial > skip-grant-tables:非常有用的mysql启动参数_MySQL

skip-grant-tables:非常有用的mysql启动参数_MySQL

WBOY
Release: 2016-06-01 13:36:11
Original
1661 people have browsed it

bitsCN.com

skip-grant-tables:非常有用的mysql启动参数

 

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

   www.bitsCN.com  

操作方法:

1、杀掉原来进行着的mysql:

rcmysqld stop

或者:

service mysqld stop

或者:

kill -TERM mysqld

 

2、以命令行参数启动mysql:

/usr/bin/mysqld_safe --skip-grant-tables &

       

3、修改管理员密码:  www.bitsCN.com  

use mysql;

update user set password=password('yournewpasswordhere') where user='root';

flush privileges;

exit;

       

4、杀死mysql,重启mysql.
 

bitsCN.com
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template