我正在尝试从 Symfony 3 应用程序连接到 MySQL 数据库。但是当尝试从 Symfony 控制台命令创建 MySQL 模式时,我收到此错误: PDO::__construct(): 服务器发送了客户端未知的字符集 (255)。请向开发者报告
PHP 和 MySQL 都在 Docker 容器中运行。
MySQL版本:8.0.1
PHP版本:7.1.3
驱动程序:pdo_mysql
字符集:UTF8
dsn: "mysql:host=mysql;dbname=database;charset=UTF8;"
有什么想法吗?
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号