[mysql]
port=3306
socket=/var/lib/mysql/mysql.sock
default-character-set = utf8mb4
[mysqld]
server-id=2
log-bin=mysql-bin
datadir=/data/mysql
socket=/var/lib/mysql/mysql.sock
#read-only = 1
binlog_format=mixed
slave_skip_errors=1062
slow_query_log
slow_query_log_file=/data/mysql/slow.log
long_query_time=5
wait_timeout=86400
interactive_timeout=86400
max_connections=1000
max_user_connections=1000
max_connect_errors=20
character_set_server=utf8
skip-external-locking
key_buffer_size = 512M
max_allowed_packet = 512M
table_open_cache = 500
sort_buffer_size = 512M
read_buffer_size = 512M
read_rnd_buffer_size = 512M
myisam_sort_buffer_size = 512M
thread_cache_size = 32
query_cache_size = 512M
#binlog-ignore-db=mysql
binlog-ignore-db=information_schema
#replicate_ignore_db=mysql
replicate_ignore_db=information_schema
expire-logs-days=10
#skip-slave-start
skip-name-resolve
lower_case_table_names=1
log_bin_trust_function_creators=1
#innodb_data_home_dir=/data/mysql/data
#innodb_log_group_home_dir=/data/mysql/logs
innodb_data_file_path=ibdata1:20M:autoextend
innodb_buffer_pool_size=48G
innodb_log_file_size=512M
innodb_log_buffer_size=512M
innodb_lock_wait_timeout=50
#innodb_file_per_table
innodb_flush_log_at_trx_commit=1
explicit_defaults_for_timestamp=true
sql_mode=STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION,NO_AUTO_VALUE_ON_ZERO
symbolic-links=0
# Recommended in standard MySQL setup
#sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
event_scheduler = 1
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid