首页 > 数据库技术 > 详细

mysql更改最大打開文件數

时间:2016-05-06 19:50:02      阅读:266      评论:0      收藏:0      [点我收藏+]

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    |
+--------------------------+-------+

本文出自 “流星宇” 博客,谢绝转载!

mysql更改最大打開文件數

原文:http://8789878.blog.51cto.com/8779878/1770769

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!