Skip to content

Instantly share code, notes, and snippets.

@mariano-aguero
Created September 30, 2015 14:49
Show Gist options
  • Save mariano-aguero/8eed47ada70311ed9672 to your computer and use it in GitHub Desktop.
Save mariano-aguero/8eed47ada70311ed9672 to your computer and use it in GitHub Desktop.
Configuration Slave Mysql
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
[mysqld]
user = mysql
pid-file = /var/run/mysqld/mysql.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
datadir = /var/lib/mysql
[mysql]
!includedir /etc/mysql/conf.d
[mysqld_safe]
log-error = /var/log/mysqld.log
[mysqld]
skip-external-locking
skip-name-resolve
# Charset and Collation
character-set-server = utf8
collation-server = utf8_general_ci
# lower_case_table_names: Unset
event_scheduler = 0
skip-character-set-client-handshake
#
# The default is now to listen only on Private IP when possible
#
#bind-address = XX.XX.XX.XX
#
# * Fine Tuning
#
key_buffer_size = 64M
max_allowed_packet = 16M
thread_stack = 256K
thread_cache_size = 512
sort_buffer_size = 4M
read_buffer_size = 1M
read_rnd_buffer_size = 1M
join_buffer_size = 1M
auto-increment-increment = 1
auto-increment-offset = 1
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover = BACKUP
max_connections = 2500
max_connect_errors = 10
concurrent_insert = 2
connect_timeout = 10
wait_timeout = 31536000
net_read_timeout = 30
net_write_timeout = 30
back_log = 100
max-connect-errors = 10000
max-allowed-packet = 16M
interactive-timeout = 3600
table_open_cache = 2048
table_definition_cache = 2048
tmp_table_size = 64M
max_heap_table_size = 64M
bulk_insert_buffer_size = 32M
open-files-limit = 1024
# Default Table Settings
sql_mode = NO_ENGINE_SUBSTITUTION
#
# * Query Cache Configuration
#
query_cache_type = 0
query_cache_limit = 1M
query_cache_size = 128M
expire_logs_days = 7
max_binlog_size = 1M
binlog_cache_size = 32K
sync_binlog = 1
# relay_log: Unset
# relay_log_index: Unset
# replicate_do_db: Unset
# replicate_do_table: Unset
# replicate_ignore_db: Unset
# replicate_ignore_table: Unset
# replicate_wild_do_table: Unset
# replicate_wild_ignore_table: Unset
# skip_slave_start: Disabled
# read_only: Disabled
transaction-isolation = READ-COMMITTED
slave_compressed_protocol = 0
# binlog_do_db: Unset
# binlog_ignore_db: Unset
#
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
# You might want to disable InnoDB to shrink the mysqld process by circa 100MB.
# skip-innodb: Disabled
innodb = FORCE
# MySQL version (5.1) < 5.5
# The following options are disabled:
# innodb_write_io_threads = 4
# innodb_io_capacity = 200
# innodb_read_io_threads = 2
# innodb_buffer_pool_instances = -274
## InnoDB Plugin Independent Settings
innodb_log_group_home_dir = /var/lib/mysql
innodb_table_locks = true
innodb_lock_wait_timeout = 60
innodb_thread_concurrency = 2
innodb_commit_concurrency = 2
innodb_support_xa = true
innodb_buffer_pool_size = 10M
innodb_log_file_size = 5M
innodb_additional_mem_pool_size = 5M
innodb_data_file_path = ibdata1:10M:autoextend
innodb_flush_log_at_trx_commit = 0
# innodb_log_files_in_group: Unset
# innodb_status_file: Disabled
innodb_file_per_table
# skip-innodb-doublewrite: Disabled
# innodb_flush_method: Unset
innodb_log_buffer_size = 8M
# innodb_adaptive_flushing: Unset
# innodb_adaptive_flushing_method: Unset
# innodb_adaptive_checkpoint: Unset
# innodb_change_buffering: Unset
# innodb_doublewrite: Unset
# innodb_file_format: Unset
innodb_data_home_dir = /var/lib/mysql
# Extra Arguments
character-set-client = utf8
interactive_timeout = 31536000
large-pages
open_files_limit = 50000
relay_log_space_limit = 16G
server_id = 181494195
thread_concurrency = 8
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
[mysql]
no-auto-rehash
[myisamchk]
key_buffer = 16M
myisam_sort_buffer_size = 64M
myisam_max_sort_file_size = 2147483648
myisam_repair_threads = 1
myisam-recover = BACKUP
[mysqld]
sync_binlog = 1
read_only = 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment