Centos7下永久修改mysql5.6最大连接数

网上看了好多的文章,教程都未能生效。

1、安装好mysql服务

2、编辑mysql配置文件

vim /etc/my.cnf

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

max_connections=10000

4、编辑/usr/lib/systemd/system/mysqld.service配置文件

5、在文件尾部添加2行:

LimitNOFILE=65535
LimitNPROC=65535

6、重启使mysql配置生效

systemctl daemon-reload
systemctl restart mysqld.service

7、查看mysql最大连接数

select @@max_connections;
正常情况应显示为10000



猜你喜欢

转载自blog.csdn.net/five3/article/details/79671317