-
-
Save zorca/df156a348af075a6aab9425ff3460559 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[client] | |
port = 3306 | |
socket = /var/run/mysqld/mysqld.sock | |
[mysqld_safe] | |
socket = /var/run/mysqld/mysqld.sock | |
nice = 0 | |
[mysqld] | |
user = mysql | |
pid-file = /var/run/mysqld/mysqld.pid | |
socket = /var/run/mysqld/mysqld.sock | |
port = 3306 | |
basedir = /usr | |
datadir = /var/lib/mysql | |
tmpdir = /tmp | |
lc_messages_dir = /usr/share/mysql | |
lc_messages = en_US | |
skip-external-locking | |
skip-name-resolve | |
performance_schema | |
bind-address = 127.0.0.1 | |
# Main | |
max_connections = 250 # change if many connections errors | |
connect_timeout = 5 | |
wait_timeout = 3600 | |
max_allowed_packet = 64M | |
thread_cache_size = 64 | |
key_buffer_size = 2048M # 1Gb=128M 2Gb=256M 4Gb=512M 8Gb=1024M 16Gb=2048M 32Gb=4096M | |
join_buffer_size = 4M | |
sort_buffer_size = 4M | |
bulk_insert_buffer_size = 16M | |
tmp_table_size = 2048M # 1Gb=128M 2Gb=256M 4Gb=512M 8Gb=1024M 16Gb=2048M 32Gb=4096M | |
max_heap_table_size = 2048M # 1Gb=128M 2Gb=256M 4Gb=512M 8Gb=1024M 16Gb=2048M 32Gb=4096M | |
table_open_cache = 4096 | |
# Query Cache | |
query_cache_limit = 128K | |
query_cache_size = 0 | |
# Logging | |
log_warnings = 2 | |
slow_query_log_file = /var/log/mysql/mariadb-slow.log | |
long_query_time = 3 | |
log_slow_verbosity = query_plan | |
#log_bin = /var/log/mysql/mariadb-bin | |
#log_bin_index = /var/log/mysql/mariadb-bin.index | |
#expire_logs_days = 10 | |
#max_binlog_size = 100M | |
#general_log | |
#general_log_file = /var/log/mysql/mysql_query.log | |
#log_error = /var/log/mysql/mysql_error.log | |
# InnoDB | |
default_storage_engine = InnoDB | |
innodb_log_file_size = 96M # 1Gb=16M 2Gb=64M >=4Gb=96M | |
innodb_buffer_pool_size = 768M # 1Gb=128M 2Gb=512M >=4Gb=768M | |
innodb_log_buffer_size = 8M | |
innodb_file_per_table = 1 | |
innodb_open_files = 400 | |
innodb_io_capacity = 400 | |
innodb_flush_method = O_DIRECT | |
innodb_flush_log_at_trx_commit = 0 | |
innodb_buffer_pool_instances = 1 | |
[mysqldump] | |
quick | |
quote-names | |
max_allowed_packet = 16M | |
[isamchk] | |
key_buffer = 16M | |
!includedir /etc/mysql/conf.d/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment