MySQL root 암호 재설정

MySQL 의 root 계정 암호를 모르는 경우

cmd1> "C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt" --skip-grant

cmd2> mysql -u root

mysql> use mysql
Database changed
mysql> UPDATE USER
    -> SET password = password('pw')
    -> WHERE user = 'root';
Query OK, 1 row affected (0.01 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)