我已经设置max_connections=2000
在/etc/my.conf
并重新启动mysqld
但仍然max_connections
似乎被困在 412
mysql> SHOW VARIABLES LIKE "max_connections";
+-----------------+-------+
| Variable_name | Value |
+-----------------+-------+
| max_connections | 412 |
+-----------------+-------+
1 row in set (0.01 sec)
mysql>
我也尝试过重新启动mysqld
发布
mysql> SET GLOBAL max_connections = 2000;
但我仍然得到 max_connections | 412
来自查询SHOW VARIABLES LIKE "max_connections";
最佳答案
为服务文件创建覆盖
systemctl编辑mysql.service
添加以下内容
[Service]
LimitNOFILE=4096
重新启动 MySQL 服务器
重启mysql服务
关于mysql - max_connections 选项不适用于 mysqld,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49108056/