首页 > 数据库技术 > 详细

常见数据库优化方案(六)

时间:2018-03-21 13:28:35      阅读:320      评论:0      收藏:0      [点我收藏+]

数据库密码重置

skip-grant-tables:非常有用的mysql启动参数(不启动grant-tables授权表)  

 

 

skip-grant-tables:非常有用的mysql启动参数
 
介绍一个非常有用的mysql启动参数—— --skip-grant-tables。顾名思义,就是在启动
mysql时不启动grant-tables,授权表。有什么用呢?当然是忘记管理员密码后有用。
   www.2cto.com  
操作方法:
1、杀掉原来进行着的mysql:
rcmysqld stop
或者:
service mysqld stop
或者:
kill -TERM mysqld
 
2、以命令行参数启动mysql:
/usr/bin/mysqld_safe --skip-grant-tables &
       
3、修改管理员密码:  www.2cto.com  
use mysql;
update user set password=password(‘yournewpasswordhere‘) where user=‘root‘;
flush privileges;
exit;
       
4、杀死mysql,重启mysql.
转自 http://www.2cto.com/database/201302/188347.html

常见数据库优化方案(六)

原文:https://www.cnblogs.com/supperlhg/p/8615981.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!