출처: joon
mysql -uroot -p
mysql> use mysql;
Database changed
mysql> update user set password=password('password') where user='root';
Query OK, 3 rows affected (0.43 sec)
Rows matched: 3 Changed: 3 Warnings: 0
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql> use mysql;
Database changed
mysql> update user set password=password('password') where user='root';
Query OK, 3 rows affected (0.43 sec)
Rows matched: 3 Changed: 3 Warnings: 0
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
-password와 root는 외따옴표로 묶어 주시면 됩니다.