是数据库配置错误 按照以下格式: 'dsn' => 'mysql:host=localhost;dbname=test;port=3306', 还可能是在某个地方有无法访问的连接 转载于:https://www.cnblogs.com/shaoing/p/5459126.html