# For advice on how to change settings please see # http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html [mysqld] # Remove leading # and set to the amount of RAM for the most important data # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%. innodb_buffer_pool_size = 14000M # Ideal value for Buffer pool is: 30 GB. Since this is slave, setting value as 4 GB # Flushing data to disk innodb-flush-method = O_DIRECT innodb-log-files-in-group = 2 innodb-log-file-size = 1024M innodb-flush-log-at-trx-commit = 1 innodb-file-per-table = 1 skip-name-resolve # CACHES AND LIMITS # tmp-table-size = 32M max-heap-table-size = 32M max-connections = 2500 thread-cache-size = 500 open-files-limit = 65535 table-definition-cache = 4096 table-open-cache = 8000 net_buffer_length = 64K read_buffer_size = 1M myisam_sort_buffer_size = 8M query_cache_size = 128M query_cache_limit = 128M # Remove leading # to turn on a very important data integrity option: logging # changes to the binary log between backups. log_bin = Slave-bin sync-binlog = 1 binlog_format=mixed # These are commonly set, remove the # and set as required. port = 3306 server_id = 2 # Remove leading # to set options mainly useful for reporting servers. # The server defaults are faster for transactions and fast SELECTs. # Adjust sizes as needed, experiment to find the optimal values. Optimal value is 5 GB. For Slave, setting as 1 GB key_buffer_size = 1000M #Join Buffer Size. Ideal is 2 GB. For slave, setting value as 1 GB join_buffer_size = 1000M sort_buffer_size = 2M read_rnd_buffer_size = 2M #sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES #To get binlog updates from master to slave log-slave-updates = ON read_only=1 #rentention period for binlog log expire_logs_days = 31 # Timestamp default value explicit_defaults_for_timestamp = true # Slow Query Log slow_query_log = 1 slow_query_log_file = mysql_slow.log #Slow Query Cutoff time long_query_time = 0.5 # Maximum size of packet to allow max_allowed_packet = 1000M max-connect-errors = 1000000 # To specify maximum length while group concatting group_concat_max_len = 1000000 # Wait time out to automatically close inactive connections wait_timeout = 180 interactive_timeout = 180 # increasing connect timeout connect_timeout=180 #Files and folder datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock [mysqld_safe] log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid