mysql更改用户密码

1、mysqladmin
mysqladmin –u username –p password 'new password'
2、手工更新授权表
mysql>update user set password=password('new password') where user='username';
mysql>flush privileges;
3、同时更新权限
mysql>grant 权限 on dbname.table to  username@ip identified by 'new password';
4、其他
mysql>set password for  username@ip=password('new password');

你可能感兴趣的:(mysql更改用户密码)