Mysql启动警告信息提示设置max_connections和table_open_cache失败。
2017-10-23 11:24:31 4915 [Warning] Buffered warning: Changed limits: max_open_files: 1024 (requested 15000)
2017-10-23 11:24:31 4915 [Warning] Buffered warning: Changed limits: max_connections: 214 (requested 3000)2017-10-23 11:24:31 4915 [Warning] Buffered warning: Changed limits: table_open_cache: 400 (requested 1520)
第一步:修改/etc/security/limits.conf
mysql hard nofile 65535
mysql soft nofile 65535
第二步:修改mysql的服务/lib/systemd/system/mysqld.service文件
添加参数:LimitNOFILE=65535
重启mysql服务
systemctl restart mysqld
重启没有警告信息
进行mysql查询
SELECT @@max_connections;