🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
最大连接数 show variables like 'max_connections'; `vim /etc/my.cnf` max_connections = 2000 # log_slow_queries="/web/mysql/mysql_slow.log" #long_query_time=1 如果没有修改成功是因为系统限制,执行以下操作 `vim /etc/security/limits.conf` 底部增加2行【阿里云ECS,centos7,**请跳过**】 * soft nofile 65535 * hard nofile 65535 在 `vim /usr/lib/systemd/system/mysqld.service` 找到 `LimitNOFILE`修改值 [Service] LimitNOFILE=65535 最后重启 reboot 临时设置最大连接数,重启就会失效,不建议 set global max_connections=1000;