mysql 5.6 修改账号密码

383 阅读1分钟

方法1:

mysql> update mysql.user set authentication_string=password('123qwe') where user='root' and Host = 'localhost';

方法2:

mysql> alter user 'root'@'localhost' identified by '123';

方法3:

mysql> set password for 'root'@'localhost'=password('123');

刷新权限

mysql> flush privileges;