【FreeBSD】MySQL更改預設root密碼的步驟

www# uname -a
FreeBSD http://www.rinbid.com 6.2-RELEASE FreeBSD 6.2-RELEASE #3: Wed Aug 15 14:49:53 CST 2007 root@www.rinbid.com:/usr/obj/usr/src/sys/RINBID i386


如果忘記 MySQL root 密碼,可以用下面的方式重新設定

killall mysqld

/usr/local/mysql/share/mysql/mysql.server start -u root --skip-grant-tables &

mysql

>use mysql
>UPDATE user SET password=password('new password') where user='root';
>FLUSH PRIVILEGES;

請小心使用

延伸閱讀:

發表迴響

在下方填入你的資料或按右方圖示以社群網站登入:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 變更 )

Twitter picture

You are commenting using your Twitter account. Log Out / 變更 )

Facebook照片

You are commenting using your Facebook account. Log Out / 變更 )

Google+ photo

You are commenting using your Google+ account. Log Out / 變更 )

連結到 %s