常見數據庫優化方案(六)
阿新 • • 發佈:2018-03-21
nbsp ref div wpa update title get 殺死 upd
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
數據庫密碼重置
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
轉自 http://www.2cto.com/database/201302/188347.html
常見數據庫優化方案(六)