我试图更改运行在Ubuntu16.04服务器上的mysql实例的max_connections配置。我试过把这个配置..。
[mysqld]
max_connections = 400...in已包含以下文件:/etc/my.cnf、/etc/mysql/my.cnf、/etc/mysql/mysql.conf.d/mysqld.cnf、/etc/mysql/conf.d/mysql.cnf。
我还在/etc/apparmor.d/usr.sbin.mysqld中添加了以下行并重新启动apparmor:
/etc/mysql/mysql.conf.d/* rl,
/etc/mysql/conf.d/* rl,不过,每次重新启动mysql服务时,都会从以下查询中获得214的值:
show global variables like "max_connections";mysql版本是mysql Ver 14.14 Distrib 5.7.19, for Linux (x86_64) using EditLine wrapper。
我遗漏了什么?
发布于 2019-01-29 22:47:23
在Ubuntu16.04中,MySQL服务的限制在Systemd配置文件中定义。要强制MySQL读取在mysqld.cnf中定义的值,请编辑服务配置:
sudo systemctl edit mysql.service添加以下行,然后保存文件:
[Service]
LimitNOFILE=infinity重新启动服务:
sudo systemctl daemon-reload
sudo systemctl restart mysql.serviceMySQL现在应该使用在您的配置文件中定义的值。
https://askubuntu.com/questions/963978
复制相似问题