Answer the question
In order to leave comments, you need to log in
Values in my.cnf [MySQL] not changing?
Hi all!
There is an Apache+MySQL web server on Ubuntu Server 16.04. site with CMS Bitrix.
There was a problem with changing the parameters in my.cnf
, namely, with table_open_cache
the value does not change, and is equal to 400
Did so, through mysqladmin SET GLOBAL table_open_cache = 10240;
changed in the /etc/mysql/my.cnf file My.cnf
file
#
# Basic mysql configuration. Use bvat for advanced settings.
# Parameters set by bvat are stored in /etc/mysql/conf.d/bvat.cnf.
# If you want to change any parameter, you'll have to redefine it in /etc/mysql/conf.d/z_bx_custom.cnf
#
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
default-character-set = utf8
[mysqld_safe]
nice = 0
socket = /var/run/mysqld/mysqld.sock
[mysqld]
sync_binlog=0
# Basic mysql server configuration
user = mysql
port = 3306
basedir = /usr
datadir = /var/lib/mysql
socket = /var/run/mysqld/mysqld.sock
skip-external-locking
default-storage-engine = innodb
pid-file = /var/run/mysqld/mysqld.pid
transaction-isolation = READ-COMMITTED
max_allowed_packet = 16M
#myisam-recover = BACKUP
expire_logs_days = 10
max_binlog_size = 100M
# Cache parameters
query_cache_size = 32M
thread_cache_size = 32
key_buffer_size = 16M
thread_stack = 2M
join_buffer_size = 2M
sort_buffer_size = 2M
# Parameters for temporary tables
tmpdir = /tmp
max_heap_table_size = 32M
tmp_table_size = 32M
# InnoDB parameters
innodb_file_per_table
innodb_buffer_pool_size = 32M
innodb_flush_log_at_trx_commit = 2
innodb_log_file_size = 64M
innodb_flush_method = O_DIRECT
# Database charset parameters
character-set-server = utf8
collation-server = utf8_unicode_ci
init-connect = "SET NAMES utf8 COLLATE utf8_unicode_ci"
#skip-character-set-client-handshake
skip-name-resolve
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
default-character-set = utf8
[mysql]
[isamchk]
key_buffer = 16M
# Include additional settings
#!includedir /etc/mysql/conf.d/
#pasted below
# from bitrix_env
# memory: 256 <= system_memory < 512
[mysqld]
query_cache_size = 32M
query_cache_limit = 2M
innodb_buffer_pool_size = 64M
#max_connections = 12
#fix 'too many connections' в поиске
max_connections = 50
thread_cache_size = 32
max_heap_table_size = 32M
tmp_table_size = 32M
key_buffer_size = 16M
join_buffer_size = 2M
sort_buffer_size = 2M
bulk_insert_buffer_size = 2M
myisam_sort_buffer_size = 2M
#добавил
open_files_limit = 8192
#solve issue with 'incompatible with DISTINCT'
sql-mode=""
[mysqld]
query_cache_type = on
query_cache_size = 128M
query_cache_limit = 128M
innodb_buffer_pool_size = 9G
#max_connections = 12
#fix 'too many connections' в поиске
max_connections = 300
thread_cache_size = 64
max_heap_table_size = 32M
tmp_table_size = 32M
key_buffer_size = 256M
join_buffer_size = 5M
sort_buffer_size = 5M
bulk_insert_buffer_size = 3M
myisam_sort_buffer_size = 3M
open_files_limit = 8192
table_open_cache = 10240
ulimit -Sn
500000
ulimit -Hn
500000
Aug 30 17:30:56 Ubuntu-1604-xenial-64-minimal mysqld[9981]: 2017-08-30T14:30:55.891779Z 0 [Warning] Could not increase number of max_open_files to more than 1024 (request: 20790)
Aug 30 17:30:56 Ubuntu-1604-xenial-64-minimal mysqld[9981]: 2017-08-30T14:30:55.891851Z 0 [Warning] Changed limits: max_connections: 214 (requested 300)
Aug 30 17:30:56 Ubuntu-1604-xenial-64-minimal mysqld[9981]: 2017-08-30T14:30:55.891858Z 0 [Warning] Changed limits: table_open_cache: 400 (requested 10240)
Aug 30 17:30:56 Ubuntu-1604-xenial-64-minimal mysqld[9981]: 2017-08-30T14:30:56.038770Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
Aug 30 17:30:56 Ubuntu-1604-xenial-64-minimal mysqld[9981]: 2017-08-30T14:30:56.038795Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question