於 Windows 2003 Server。
如果忘記 MySQL 的 root 密碼,需要停止 MySQL 的服務,確認 taskmgr 中,
mysqld.exe 已沒有執行,於命令提示字元執行 mysqld -u root --skip-grant-tables &,
cmd → mysql → update mysql.user set password=PASSWORD("abc345") where User='root'; →
flush privileges; → quit;
關閉命令提示字元所執行的 mysqld,確認 taskmgr 中 mysqld.exe 已沒有執行,
重新啟動 MySQL 的服務,如此即可以新的密碼登入。

cmd → mysql -u root -p → abc123 →
mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| test               |
+--------------------+
4 rows in set (0.00 sec)

arrow
arrow
    全站熱搜

    flyfox 發表在 痞客邦 留言(0) 人氣()