CentOS7下mysql5.6 连接数修改不生效

原文:https://blog.csdn.net/five3/article/details/79671317

1、安装好mysql服务

2、编辑mysql配置文件vim /etc/my.cnf

3、在[mysqld]分段下添加一行:max_connections=1000

4、编辑/usr/lib/systemd/system/mysqld.service配置文件,在文件尾部添加2行:

LimitNOFILE=65535

LimitNPROC=655356、

5、重启使mysql配置生效

systemctl daemon-reload

systemctl restart mysql

6、查看mysql最大连接数

show global variables like 'max_connections';          1000

猜你喜欢

转载自blog.csdn.net/weixin_40720226/article/details/85702929