Changed limits: max_open_files: 1024

如果mysql数据库启动的时候,出现如下的错误

2016-07-22 15:01:43 26283 [Warning] Buffered warning: Changed limits: max_open_files: 1024 (requested 5010

2016-07-22 15:01:43 26283 [Warning] Buffered warning: Changed limits: max_connections: 214 (requested 1000)

2016-07-22 15:01:43 26283 [Warning] Buffered warning: Changed limits: table_open_cache: 400 (requested 2000)

除了修改/etc/security/limits.conf

加上

* hard nofile 65535
* soft nofile 65535

还需要在  /usr/lib/systemd/system/mysqld.service 

加上如下的话

LimitNOFILE=65535

mysql的错误信息就消失了。


你可能感兴趣的:(mysql)