您必须使用MySQL 8和PHP7 +的旧式密码:
ALTER USER 'username'@'ip_address' IDENTIFIED WITH mysql_native_password BY 'password';