1. 查看内核限制
# ulimit -n 65535
2. 修改 my.cnf 限制
# vi /etc/my.cnf [mysqld] open_files_limit = 65535
3. 重启 mysqld
# /etc/init.d/mysql restart
4. 查看结果
mysql>show global variables like ‘%open%‘;
| open_files_limit | 65535 |
| table_open_cache | 1000 |
mysql> show global status like ‘open_%‘;
+--------------------------+-------+
| Variable_name | Value |
+--------------------------+-------+
| Open_files | 827 |
| Open_streams | 0 |
| Open_table_definitions | 40 |
| Open_tables | 34 |
| Opened_files | 900 |
| Opened_table_definitions | 40 |
| Opened_tables | 41 |
+--------------------------+-------+
本文出自 “流星宇” 博客,谢绝转载!
原文地址:http://8789878.blog.51cto.com/8779878/1770769