1610803419014.png

    因为mysql8.0以后的版本,密码认证策略不一样,所以要改成5.7版本之前的认证策略

    1. ALTER USER 'root'@'%' IDENTIFIED BY 'password'
    2. ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'password';

    刷新权限

    1. FLUSH PRIVILEGES;