首页 > 数据库 > MySQL > 解决max_connections最大为214的问题
3、进入目录 /etc/systemd/system/multi-user.target.wants,找到文件mysql.service;
ps: centos7 系统的文件路径如下:/usr/lib/systemd/system/mysqld.service
4、sudo vim mysql.service,在 [Service] 最后加入:
LimitNOFILE=65535
LimitNPROC=65535
5、执行下面命令使修改生效:
systemctl daemon-reload
systemctl restart mysql.service
6、登录msyql ,查看max_connections 和open_files_limit是否更新成功。
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/24349972/viewspace-2156648/ ,如需转载,请注明出处,否则将追究法律责任。