mysql root 密碼更改
如果忘記了 MySQL 的 root 密碼,可以用以下方法重新設定:
1. 關閉 MySQL 伺服器。
/etc/rc.d/init.d/mysqld stop
2. 用以下指令啟動 MySQL,以跳過檢查權限的資料表
mysqld_safe --skip-grant-tables &
(顯示訊息 nohup: ignoring input and redirecting stderr to stdout
Starting mysqld daemon with databases from /var/lib/mysql 直接按Enter)
3. 現在己經可以用空密碼進入 MySQL
mysql -u root
4. 進入 MySQL 後執行以下指令更改 mysql root 密碼:
mysql> update mysql.user set password=PASSWORD(」new_password」) where User=』root';
mysql> flush privileges;
mysql> quit
5. 最後只需重新啟動 MySQL,便可以用新設定的密碼進入了。
參考自:http://www.cosa.org.tw/forum/index.php?topic=73.0
迴響
mysql root 密碼更改 | 豬窩 | 775
It's actually a nice and useful piece of info.
I am satisfied that you simply shared this useful information with
us. Please keep us informed like this. Thanks for sharing.
mysql root 密碼更改 | 豬窩 | 1295
I visited many sites however the audio feature for
audio songs existing at this website is truly superb.
mysql root 密碼更改 | 豬窩
Great information. Lucky me I came across your blog by accident (stumbleupon).
I've book marked it for later!
mysql root 密碼更改 | 豬窩 | 763
Your way of telling everything in this post is actually
good, every one be able to without difficulty be aware
of it, Thanks a lot.
mysql root 密碼更改 | 豬窩 | 818
I intended to put you this little bit of
note to finally say thank you again for the magnificent solutions you've shown here.
This has been really surprisingly generous with you to give without
restraint all a lot of folks might have offered for an electronic book to earn some profit
for their own end, primarily given that you could have
done it in the event you wanted. The techniques
also served like the great way to recognize that other people online have the identical zeal like mine to know the truth a little more with respect to this condition. I am sure there
are a lot more pleasant times in the future for folks who scan your blog.