【发布时间】:2015-09-03 05:55:17
【问题描述】:
我正在运行这个版本的 Mysql
Ver 14.14 Distrib 5.6.24, for debian-linux-gnu (x86_64)
在这个版本的 Ubuntu 上
Distributor ID: Ubuntu
Description: Ubuntu 15.04
Release: 15.04
Codename: vivid
这是我为 Mysql 设置的配置:
key_buffer_size = 16M
max_allowed_packet = 16M
thread_stack = 192K
thread_cache_size = 8
innodb_buffer_pool_size=20G
innodb_log_buffer_size=16M
tmp_table_size = 32M
max_heap_table_size = 32M
open-files-limit=4510
max_connections=500
myisam-recover = BACKUP
query_cache_type=1
query_cache_limit = 32M
query_cache_size = 32M
这些是我在启动 MYSQL 时不断收到的警告:
2015-06-17 17:28:53 26720 [Warning] Buffered warning: Could not increase number
of max_open_files to more than 1024 (request: 4510)
2015-06-17 17:28:53 26720 [Warning] Buffered warning: Changed limits: max_connections:
214 (requested 500)
2015-06-17 17:28:53 26720 [Warning] Buffered warning: Changed limits: table_open_cache:
400 (requested 2000)
我已经尝试了这些步骤:
1) 将此添加到/etc/security/limits.conf
mysql soft nofile 65535
mysql hard no file 65535
2) 将此添加到 /etc/pam.d/common-auth 和 /etc/pam.d/commom-session
session required pam_limits.so
3) 将此添加到/etc/mysql/mysql.conf.d/mysqld.cnf
open-files-limit=4510 or open_files_limit=4510
这些都不起作用,我仍然无法将 mysql 最大连接数提高到 500。
在这一点上,我非常感谢一些帮助。
非常感谢。
【问题讨论】:
-
嘿@BK435,感谢分享链接。可悲的是,我尝试了那里的步骤并不断收到相同的警告,并且无法增加 max_open_files 或 max_connections。
标签: mysql performance ubuntu