解决CentOs7.2.1511下mysql5.6.38版本max_connections设置失败的问题

来源:互联网 发布:成语接龙作弊软件 编辑:程序博客网 时间:2024/06/07 10:25

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;




阅读全文
0 0
原创粉丝点击