Skip to content

Instantly share code, notes, and snippets.

@cbiggins

cbiggins/my.cnf Secret

Created June 13, 2014 01:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cbiggins/0aa26f6defb7a14541d7 to your computer and use it in GitHub Desktop.
Save cbiggins/0aa26f6defb7a14541d7 to your computer and use it in GitHub Desktop.
[mysqld]
#datadir=/var/lib/mysql
#socket=/var/lib/mysql/mysql.sock
## Disabling symbolic-links is recommended to prevent assorted security risks
#symbolic-links=0
## Settings user and group are ignored when systemd is used.
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mysqld according to the
# instructions in http://fedoraproject.org/wiki/Systemd
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
symbolic-links=0
# Default to using old password format for compatibility with mysql 3.x
# # clients (those using the mysqlclient10 compatibility package).
# old_passwords=1
#
# # Disabling symbolic-links is recommended to prevent assorted security risks;
# # to do so, uncomment this line:
# # symbolic-links=0
max_allowed_packet=128M
port = 3306
socket = /var/lib/mysql/mysql.sock
pid-file = /var/run/mysqld/mysqld.pid
skip-external-locking
max_connections = 2000
key_buffer = 1500M
myisam_sort_buffer_size = 64M
join_buffer_size = 4M
read_buffer_size = 4M
sort_buffer_size = 4M
table_cache = 6000
thread_cache_size = 512
wait_timeout = 30
interactive_timeout = 10
connect_timeout = 5
tmp_table_size = 1024M
max_heap_table_size = 1024M
max_connect_errors = 999999999
thread_concurrency = 4
query_cache_limit = 10M
query_cache_size = 96M
query_cache_type = 1
query_prealloc_size = 16384
query_alloc_block_size = 16384
query_cache_min_res_unit = 1k
old_passwords = 1
tmpdir = /tmp/mysql
expire_logs_days = 5
innodb_file_per_table = 1
innodb_additional_mem_pool = 8M
innodb_log_buffer_size = 4M
innodb_log_file_size = 128M
# http://stackoverflow.com/questions/12316122/mysql-very-slow-update-insert-delete-queries-hanging-on-query-end-step
innodb_flush_log_at_trx_commit=2
innodb_flush_method=O_DIRECT
innodb_buffer_pool_size=15GB
innodb_doublewrite=0
innodb_support_xa=0
innodb_thread_concurrency=200
long_query_time = 2
slow_query_log = 1
slow_query_log_file = /var/log/mysqld_slow_query_log
log-bin = /var/lib/mysql/mysql-bin.log
binlog-do-db=skycom_sau
server-id=1
binlog_format = MIXED
# [mysqld_safe]
# log-error=/var/log/mysqld.log
# pid-file=/var/run/mysqld/mysqld.pid
#
[isamchk]
key_buffer = 128M
sort_buffer_size = 128M
read_buffer = 2M
write_buffer = 2M
[myisamchk]
key_buffer = 128M
sort_buffer_size = 128M
read_buffer = 2M
write_buffer = 2M
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment