mysql密码相关


1、更新密码:

set password for your_username@localhost=password('your_password');

2、使用mysqladmin更新密码:

mysqladmin -u your_username -p old_password <回车>

输入新密码即可

3、update编辑user表

通过其他随笔有记录,这里重点注意:

update mysql.user set authentication_string=password('新密码') where user="用户名" and Host='localhost';

flush privileges;