putty 키고
아이디 비번치고 들어가서
이제 MySQL root 패스워드를 변경합니다.
mysql> use mysql;
Database changed
mysql> UPDATE user SET password=PASSWORD('변경할패스워드') where user='root';
Query OK, 0 rows affected (0.14 sec)
Rows matched: 1 Changed: 0 Warnings: 0
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.11 sec)
mysql> quit
Bye
Database changed
mysql> UPDATE user SET password=PASSWORD('변경할패스워드') where user='root';
Query OK, 0 rows affected (0.14 sec)
Rows matched: 1 Changed: 0 Warnings: 0
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.11 sec)
mysql> quit
Bye
출처