您的当前位置:首页正文

MySQL 更新密码

2024-11-09 来源:个人技术集锦

5.7之前

mysql> UPDATE user SET password=PASSWORD(“new password”) WHERE user=‘username’;

5.7

mysql> UPDATE user SET authentication_string=PASSWORD(“new_password”) WHERE user=‘root’;

//刷新系统权限表
mysql> FLUSH PRIVILEGES;

Top