Thinkphp reports SQLSTATE [HY000] [1040] Too many connections

Detailed error report

SQLSTATE [HY000] [1040] Too many connections

Too many Mysql connections

insert image description here
I found the code problem all afternoon, and changed the Mysql configuration all afternoon

Solution

Enter: databases.php

Modify: params
insert image description here

    // 数据库连接参数
    'params'          => [
        \PDO::ATTR_PERSISTENT   => true,
        \PDO::ATTR_CASE         => \PDO::CASE_LOWER,
    ],

Guess you like

Origin blog.csdn.net/qq_36678880/article/details/128521175