1. 程式人生 > >centos_7 mariadb 的最大連線數max_connections修改 解決 too many connections

centos_7 mariadb 的最大連線數max_connections修改 解決 too many connections

輸入show variables like 'max_connections';

一、修改mariadb.service
vim /usr/lib/systemd/system/mariadb.service
在[Service]下面加入以下內容

LimitNOFILE=10000
LimitNPROC=10000

二、修改/etc/my.cnf
vim /etc/my.cnf
在[mysqld]下,加入以下內容

max_connections=4096

輸入show variables like 'max_connections';

就看到改變了