基本上就是把mysql server啟動在一個跳過密碼檢查的狀態下
登入mysql server, 重設一個root的密碼
再把mysql server正常啟動
------------------------------------------
Start MySQL Server without password:
# mysqld_save --skip-grant-tables &
Login MySQL Server as root:
# mysql -u root
Setup new password for root:
mysql> use mysql;
mysql> update user set password=PASSWORD("new-password-for-root") where User='root';
mysql> flush privileges;
mysql> quit
Start MySQL Server Normally:
# service mysqld start
當然是要把先前啟動的mysql server停下來後, 再重新啟動
Ref. Link --> http://www.cyberciti.biz/tips/recover-mysql-root-password.html
沒有留言:
張貼留言