您的位置:首页 > 数据库 > MySQL

mysql更改最大打開文件數

2016-05-06 15:10 567 查看
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 |
+--------------------------+-------+
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息