授权:
mysql> GRANT ALL ON *.* TO 'root'@'%';
刷新权限:
mysql> flush privileges;
更新加密规则:
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER;
更新root用户密码:
mysql> ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '123456';
刷新权限:
mysql> flush privileges;