mysql> use mysql
Database changed
mysql> select host,user from user;
+-----------+------+
| host      | user |
+-----------+------+
| %         |      |
| %         | root |
| localhost |      |
| localhost | root |
+-----------+------+
4 rows in set (0.02 sec)

mysql> update user set password=password('newpassword') where user='root';
Query OK, 2 rows affected (0.00 sec)
Rows matched: 2  Changed: 2  Warnings: 0

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

相关文章:

  • 2021-11-14
  • 2021-11-22
  • 2022-02-27
猜你喜欢
  • 2021-05-07
  • 2022-12-23
  • 2022-01-04
  • 2021-10-24
  • 2021-12-01
  • 2021-04-02
相关资源
相似解决方案