The MySQL configuration is as follows: [mysqld] core-file user = mysql port = 3306 datadir = /db socket = /tmp/mysql.sock default-storage-engine = innodb skip-external-locking log_warnings=1 skip_name_resolve character-set-server = utf8mb4 collation-server = utf8mb4_unicode_ci group_concat_max_len = 1000000 server-id = 666 # InnoDB settings innodb_data_home_dir = /db innodb_log_group_home_dir = /db innodb_data_file_path = ibdata1:100M:autoextend innodb_buffer_pool_size = 20G innodb_buffer_pool_instances = 8 innodb_log_file_size = 10G innodb_buffer_pool_load_at_startup=OFF innodb_buffer_pool_dump_at_shutdown=OFF # allows for row_format=compressed innodb_file_format=Barracuda innodb_log_buffer_size = 64M innodb_flush_log_at_trx_commit = 0 innodb_lock_wait_timeout = 50 innodb_file_per_table innodb_doublewrite = 0 innodb_io_capacity = 1200 innodb_read_io_threads = 6 innodb_write_io_threads = 6 innodb_stats_on_metadata = OFF # Slow query log settings # The default logs all full table scans,tmp tables,filesorts on disk queries #use_global_long_query_time = 1 #long_query_time = 0.5 slow_query_log_file = slowquery.log slow_query_log = 1 long_query_time = 3 log_slow_filter = "full_scan,tmp_table_on_disk,filesort_on_disk" log_slow_verbosity = "full" # Other general MySQL settings sync_binlog = 0 query_cache_type = 0 query_cache_size = 0 max_connections = 3000 thread_cache_size = 1000 back_log = 1024 thread_concurrency = 32 innodb_thread_concurrency = 64 tmpdir = /var/tmp max_allowed_packet = 24M max_join_size = 4294967295 net_buffer_length = 2K thread_stack = 512K tmp_table_size = 64M max_heap_table_size = 64M table_open_cache = 2000 # Replication settings (master to slave) binlog_cache_size = 2M binlog_format=mixed log-bin = bin log-error = error.log expire_logs_days = 5 slave-parallel-workers = 10 master-info-repository = "table" relay-log-info-repository = "table" gtid_mode = ON enforce_gtid_consistency = true log-slave-updates replicate-ignore-table = mysql.user replicate-ignore-table = mysql.db replicate-ignore-table = mysql.tables_priv replicate-ignore-table = mysql.proxies_priv # Started tuning slave catchup speed, can use more research slave-checkpoint-period = 1000 slave-checkpoint-group = 2048
Wednesday, August 29, 2018
EXAMPLE : my.cnf mysql configuration file
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment