tp5.1报这个错是怎么回事了,数据库也能连接通.

浏览:601 发布日期:2020/11/30 分类:ThinkPHP5专区
[1040] PDOException in Connection.php line 528
SQLSTATE[08004] [1040] Too many connections
try {
if (empty($config['dsn'])) {
$config['dsn'] = $this->parseDsn($config);
}

if ($config['debug']) {
$startTime = microtime(true);
}

$this->links[$linkNum] = new PDO($config['dsn'], $config['username'], $config['password'], $params);

if ($config['debug']) {
// 记录数据库连接信息
$this->log('[ DB ] CONNECT:[ UseTime:' . number_format(microtime(true) - $startTime, 6) . 's ] ' . $config['dsn']);
}

return $this->links[$linkNum];
} catch (\PDOException $e) {
if ($autoConnection) {
最佳答案
评论( 相关
后面还有条评论,点击查看>>