mysql> use mysql; Database changed mysql> select user,host,password from user; +------+-----------+-------------------------------------------+ | user | host | password | +------+-----------+-------------------------------------------+ | root | localhost | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 | | root | mysql1 | | | root | 127.0.0.1 | | | root | ::1 | | | | localhost | | | | mysql1 | | +------+-----------+-------------------------------------------+ 6 rows in set (0.00 sec) mysql> update user set password=PASSWORD('789789') where user='root' and host='localhost'; Query OK, 1 row affected (0.00 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql> flush privileges; Query OK, 0 rows affected (0.00 sec) |