Mysql5.7前后修改用户密码变化
本文主要强调修改密码的sql语句变化。如果是root密码忘记了,请参考Mysql忘记root密码怎么解决
Mysql 5.7以前修改密码
update mysql.user set password=password('123456') where user='newuser' and host='localhost';
flush privileges;
Mysql 5.7以后修改密码
update mysql.user set authentication_string=password('123456') where user='newuser' and host='localhost';
flush privileges;