mysql8.0修改user密码方式记录

先将密码置空,再修改密码

mysql> update user set authentication_string='' where user='root';
 
mysql> flush privileges;
 
mysql> ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'xxxxxx';

你可能感兴趣的:(经验,学习,服务器,数据库)