CentOS7.4 修改mariadb数据库最大连接数.md
1、修改/etc/my.cnf配置文件
vi /etc/my.cnf
[mysqld] max_connections=1024
2、配置/usr/lib/systemd/system/mariadb.service来调大打开文件数目。
vi /usr/lib/systemd/system/mariadb.service
[Service] LimitNOFILE=10000 LimitNPROC=10000
3、重启数据库
systemctl daemon-reload systemctl restart mariadb.service
4.检查效果
mysql -u root -p show variables like 'max_connections'; quit
来自:有道云笔记 https://note.youdao.com/ynoteshare/index.html?id=0595ea36a5687346819c349fc3275426