Created
April 6, 2016 18:21
-
-
Save igortik/ee30b26620f15f93773d9b4efbdb3de6 to your computer and use it in GitHub Desktop.
MySQL configuration with common optimisation and replication support
This file contains hidden or 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
[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 (fedora >= 15). | |
# 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 | |
user=mysql | |
# Semisynchronous Replication | |
# http://dev.mysql.com/doc/refman/5.5/en/replication-semisync.html | |
# uncomment next line on MASTER | |
;plugin-load=rpl_semi_sync_master=semisync_master.so | |
# uncomment next line on SLAVE | |
;plugin-load=rpl_semi_sync_slave=semisync_slave.so | |
# Others options for Semisynchronous Replication | |
;rpl_semi_sync_master_enabled=1 | |
;rpl_semi_sync_master_timeout=10 | |
;rpl_semi_sync_slave_enabled=1 | |
# http://dev.mysql.com/doc/refman/5.5/en/performance-schema.html | |
;performance_schema | |
innodb_file_per_table=1 | |
slow-query-log=1 | |
slow_query_log_file=/var/log/mysql-slow-query.log | |
long_query_time=3 | |
query_cache_size=32M | |
innodb_buffer_pool_size=2G | |
innodb_log_file_size=128M | |
innodb_log_buffer_size=4M | |
innodb_flush_log_at_trx_commit=2 | |
innodb_thread_concurrency=8 | |
innodb_flush_method=O_DIRECT | |
[mysqld_safe] | |
log-error=/var/log/mysqld.log | |
pid-file=/var/run/mysqld/mysqld.pid | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment