当我尝试连接到数据库时,在 PHP Symfony4/PDO Doctrine with MySql 8.0.13 Server 中出现此错误:
An exception occurred in driver: SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client
最佳答案
您必须为 MySQL 8 和 PHP7+ 使用旧式密码:
ALTER USER 'username'@'ip_address' IDENTIFIED WITH mysql_native_password BY 'password';
关于php - 驱动程序 : SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client 发生异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53066962/