忘記mysql 密碼的取回方法

標簽: 瀏覽(914)  日期:2007-09-08
如果 MySQL 正在運行,
首先殺之: killall -TERM mysqld(如果是windows,直接調出進程管理器,結束之)
以安全模式啓動 MySQL :
/usr/bin/safe_mysqld --skip-grant-tables &
(windows 下 mysql安裝所以盤/mysql/bin/safe_mysqld --skip-grant-tables )
就可以不需要密碼就進入 MySQL 了。
然後就是
>use mysql
>update user set password=password("new_pass") where user="root";
>flush privileges;
重新殺 MySQL ,用正常方法啓動 MySQL 。




-------------------------------------------------
上一篇:MySQL VIEW as performance troublemaker 下一篇:MySQL 服务器调优

admin   2007-09-08

FLUSH PRIVILEGES;



  
Are you Bot? How you know that?ofcz no.