mysql更改最大打開文件數
2016-05-06 15:10
567 查看
1. 查看内核限制
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 |
+--------------------------+-------+
# ulimit -n 655352. 修改 my.cnf 限制
# vi /etc/my.cnf [mysqld] open_files_limit = 655353. 重启 mysqld
# /etc/init.d/mysql restart4. 查看结果
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中的integer 数据类型
- MySQL存储过程
- mysql中int、bigint、smallint 和 tinyint的区别与长度
- mysql load data 导出、导入 csv
- source命令执行SQL脚本文件
- MySQL创建用户及权限控制
- MySQL管理数据表
- linux下mysql添加用户
- mysql procedure
- mysql触发器
- MySQL 备份和恢复策略
- mac下安装mysql(转载)
- mysql 修改编码 Linux/Mac/Unix/通用(杜绝修改后无法启动的情况!)
- MySQL数据的导出、导入(mysql内部命令:mysqldump、mysql)
- mysql数据行转列
- Linux下修改MySQL编码的方法
- MySQL Server 日志
- MySQL 安全事宜
- MySQL 备份与恢复