[client]
#客户端选项设置
#设置客户端和连接字符集
default_character_set = utf8
port = 3306
socket = /opt/mysql-5.6.24/tmp/mysql.socket
[mysqld]
#服务器端选项设置
# innodb设置
default_storage_engine = InnoDB
innodb_strict_mode = 1
innodb_buffer_pool_size = 256M #mysql数据库服务器,该值可设为物理内存的50%-80%之间
innodb_stats_on_metadata = 0
innodb_file_format = Barracuda
innodb_data_file_path=ibdata1:10m:autoextend
innodb_flush_method = O_DIRECT
innodb_log_files_in_group = 2
innodb_log_file_size = 16M
innodb_log_buffer_size = 8M
innodb_file_per_table = 1
innodb_max_dirty_pages_pct = 60
innodb_io_capacity = 200
innodb_flush_log_at_trx_commit = 2
# 基本设置
basedir = /opt/mysql-5.6.24
datadir = /opt/mysql-5.6.24/data
port = 3306
tmpdir = /opt/mysql-5.6.24/tmp
socket = /opt/mysql-5.6.24/tmp/mysql.socket
pid-file = /opt/mysql-5.6.24/data/mysql.pid
skip-name-resolve = 1
skip-external-locking = 1
lower_case_table_names=1
#连接数设置
max_connect_errors = 500
max_connections = 1000
#mysql server打开文件限制
open_files_limit = 65535
#复制相关选项
server_id = 1553306
relay-log = mysql-relay-bin
log-slave-updates = 1
skip_slave_start = 1
read_only = 0
replicate-ignore-table = mysql.ibbackup_binlog_marker
slave-skip-errors = ddl_exist_errors
relay-log-info-repository = TABLE
master_info_repository = TABLE
relay_log_recovery = 1
plugin-load = "rpl_semi_sync_master=semisync_master.so;rpl_semi_sync_slave=semisync_slave.so"
gtid-mode = ON
enforce-gtid-consistency = 1
log-bin-trust-function-creators
#查询缓存相关参数
query_cache_type = 0
query_cache_size = 0
# 服务器字符集设置
character_set_server = utf8
# error log设置
log_error = /opt/mysql-5.6.24/data/mysql.err
# slow log设置
slow_query_log = 1
slow_query_log_file = /opt/mysql-5.6.24/data/mysql-slow.log
long_query_time = 0.5
# binlog设置
binlog_format = mixed
log-bin = /opt/mysql-5.6.24/logs/mysql-bin
sync_binlog = 2
max_binlog_size = 16M
expire_logs_days = 10
#内存设置
key_buffer_size = 8M
tmp_table_size = 8M
max_heap_table_size = 8M
thread_cache_size = 1024
table_open_cache = 1024
max_allowed_packet = 16M
join_buffer_size = 128M
sort_buffer_size = 2M
read_rnd_buffer_size = 2M
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES