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 |
+--------------------------+-------+
时间: 2024-11-03 03:45:08