1. 程式人生 > >my.cnf

my.cnf

my.cnf

[client]

socket = /paic/mysql01/var/mysql.sock

port = 3306

[mysqld]


############ GENERAL #############

autocommit = ON

character_set_server = UTF8MB4

collation_server = UTF8MB4_bin

explicit_defaults_for_timestamp = ON

lower_case_table_names = 1

port = 3306

read_only = OFF

transaction_isolation = READ-COMMITTED


####### CACHES AND LIMITS #########

interactive_timeout = 600

max_allowed_packet = 32M

max_connect_errors = 10000

max_connections = 4000

max_user_connections = 2000

sort_buffer_size = 1M

table_definition_cache = 1400

table_open_cache = 2000

table_open_cache_instances = 4

thread_cache_size = 9

thread_stack = 256K

tmp_table_size = 32M


############# SAFETY ##############

local_infile = OFF

#plugin-load = validate_password.so

skip_name_resolve = ON

#sql_mode = STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_AUTO_VALUE_ON_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,ONLY_FULL_GROUP_BY


############# LOGGING #############

general_log = 0

log_queries_not_using_indexes = ON

log_slow_admin_statements = ON

log_warnings = 2

long_query_time = 1

slow_query_log = OFF


############# REPLICATION #############

binlog_checksum = CRC32

binlog_format = row

binlog_rows_query_log_events = ON

#enforce_gtid_consistency = ON

expire_logs_days = 5

#gtid_mode = ON

#log_slave_updates = ON

master_info_repository = TABLE

master_verify_checksum = ON

max_binlog_size = 256M

relay_log_info_repository = TABLE

server_id = 194196

skip_slave_start = ON

slave_net_timeout = 4

slave_sql_verify_checksum = ON

sync_binlog = 0

sync_master_info = 10000

sync_relay_log = 10000

sync_relay_log_info = 10000

slave_skip_errors=1032,1062


############### PATH ##############

basedir = /paic/mysql/base


datadir = /paic/mysql01/data

tmpdir = /paic/mysql01/tmp

socket = /paic/mysql01/var/mysql.sock

pid_file = /paic/mysql01/var/mysql.pid

innodb_data_home_dir = /paic/mysql01/data


log_error = /paic/mysql01/log/error.log

general_log_file = /paic/mysql01/log/general.log

slow_query_log_file = /paic/mysql01/log/slow.log


log_bin = /paic/mysql01/log/mysql-bin

log_bin_index = /paic/mysql01/log/mysql-bin.index

relay_log = /paic/mysql01/log/relay-log

relay_log_index = /paic/mysql01/log/relay-log.index


############# INNODB #############

innodb_file_format = barracuda

innodb_flush_method = O_DIRECT

innodb_buffer_pool_size = 48G

#innodb_log_file_size = 256M

innodb_log_file_size=33554432

innodb_log_files_in_group=3

#innodb_log_files_in_group = 4

innodb_flush_log_at_trx_commit = 2

innodb_support_xa = ON

innodb_strict_mode = ON

#innodb_data_file_path=ibdata1:12M:autoextend

innodb_data_file_path = ibdata1:256M;ibdata2:16M:autoextend

#innodb_checksum_algorithm = strict_crc32


[mysql]

############# CLIENT #############

max_allowed_packet = 32M

socket = /paic/mysql01/var/mysql.sock

[mysqldump]

max_allowed_packet = 256M

[mysqld_safe]

ledir=/paic/mysql/bin


my.cnf