Sample mysql configuration file
[client]
Port=3306
Socket=/data/mysqldata/mysql.sock
[mysql]
Socket=/data/mysqldata/mysql.sock
Port=3306
No-auto-rehash
Default-character-set=utf8mb4
Prompt=\\ u@\\ d\ R:\\ m >
[mysqld]
Port=3306
Server_id=88888
Socket=/data/mysqldata/mysql.sock
Datadir=/data/mysqldata
Basedir=/usr/local/mysql
Transaction_isolation=REPEATABLE-READ
Back_log=500
Event_scheduler=OFF
Slow_query_log_file=/data/mysqllog/slow-query.log
Log_error=/data/mysqllog/errlog.err
General_log_file=/data/mysqllog/mysql-general.log
Relay-log=/data/mysqllog/relay-log/relay-log.bin
Relay_log_recovery=on
Innodb_data_home_dir=/data/mysqldata
Innodb_undo_directory=/data/mysqldata
Innodb_log_group_home_dir=/data/mysqldata
Log_bin=/data/mysqllog/binlog/binlog.bin
Skip-character-set-client-handshake=1
Character_set_server=utf8mb4
Collation_server=utf8mb4_general_ci
# # INNODB
Innodb_undo_tablespaces=3
Innodb_undo_logs=128
Group_concat_max_len=8388608
Innodb_additional_mem_pool_size=20M
Innodb_file_per_table=1
Innodb_page_size=16384
Innodb_buffer_pool_size=62G
Innodb_data_file_path=ibdata1:1G:autoextend
Innodb_lock_wait_timeout=120
Innodb_rollback_on_timeout=1
Innodb_print_all_deadlocks=on
Innodb_read_io_threads=8
Innodb_write_io_threads=8
Innodb_adaptive_hash_index=1
Innodb_adaptive_flushing=1
Innodb_adaptive_flushing_lwm=30
Innodb_thread_concurrency=16
Innodb_flush_method=O_DIRECT
Innodb_max_dirty_pages_pct=50
Innodb_io_capacity=500
Innodb_support_xa=1
Innodb_buffer_pool_instances=8
Innodb_sort_buffer_size=16M
Innodb_file_format=Barracuda
Innodb_file_format_max=Barracuda
Innodb_file_format_check=1
Innodb_fast_shutdown=1
Innodb_purge_threads=2
Innodb_flush_log_at_trx_commit=2
Innodb_log_buffer_size=64M
Innodb_log_file_size=512M
Innodb_log_files_in_group=3
Innodb_autoextend_increment=128
# # MyISAM
Key_buffer_size=64M
Myisam_sort_buffer_size=128M
Myisam_max_sort_file_size=10G
Concurrent_insert=2
# # OTHER
Sync_binlog=1
Binlog_format=row
Binlog_cache_size=256K
Binlog_checksum=CRC32
Max_binlog_size=512M
Log_bin_trust_function_creators=1
Expire_logs_days=10
Slow_query_log=on
Binlog_rows_query_log_events=1
Long_query_time=1
Read_buffer_size=4M
Read_rnd_buffer_size=4M
Bulk_insert_buffer_size=64M
Sort_buffer_size=6M
Join_buffer_size=4M
Query_cache_type=0
Query_cache_size=0
Query_cache_limit=2M
Tmp_table_size=64M
Table_open_cache=5120
Thread_cache_size=128
Open_files_limit=65535
Master-info-repository=TABLE
Relay-log-info-repository=TABLE
Skip_external_locking=1
Net_buffer_length=8K
Skip_name_resolve=1
Secure_file_priv=''
Log_slave_updates=1
# # MAXLIMIT
Max_connections=1000
Max_length_for_sort_data=8096
Max_heap_table_size=64M
Max_allowed_packet=1G
Max_connect_errors=99999999
Max_heap_table_size=512M
Max_length_for_sort_data=16k
Max_slowlog_files = 3
Max_slowlog_size = 1073741824
# # TIMEOUT
Wait_timeout=28800
Interactive_timeout=28800
[mysqldump]
Max_allowed_packet=512M
Default-character-set=utf8mb4