--修改test用户密码为999999
mysql> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> UPDATE user SET password=PASSWORD('999999') WHERE user='test';
Query OK, 2 rows affected (0.00 sec)
Rows matched: 2 Changed: 2 Warnings: 0
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql>
mysql 更改user表修改密码
本文演示了如何在MySQL中更改用户密码,具体步骤包括选择mysql库,使用UPDATE语句设置新密码,并执行flush privileges来应用变更。
摘要由CSDN通过智能技术生成