[client]
port = 3306
socket = /opt/mysql/mysql.sock
[mysqld]
port = 3306
socket = /opt/mysql/mysql.sock
basedir = /opt/mysql
datadir = /opt/mysql/data
skip-external-locking
key_buffer_size = 32M
max_allowed_packet = 16M
table_open_cache = 512
net_buffer_length = 8K
read_buffer_size = 2M
read_rnd_buffer_size = 8M
myisam_sort_buffer_size = 8M
lower_case_table_names= 1
init_connect='SET NAMES utf8mb4'
log_bin_trust_function_creators=1
innodb_buffer_pool_size=1024M
innodb_log_file_size=256M
innodb_io_capacity=500
innodb_io_capacity_max=700
innodb_lru_scan_depth=2000
innodb_lock_wait_timeout = 200
innodb_file_per_table=1
# 主从配置记得server-id需要补同
server-id= 1
#Binary log/replication
#log-bin=mysql-bin
#binlog-do-db=test_mysql
#binlog-ignore-db=mysql
#binlog-do-db=merchantdb
sync_binlog=1
sync_relay_log=1
relay-log-info-repository=TABLE
master-info-repository=TABLE
expire_logs_days=5
binlog_format=ROW
transaction-isolation=READ-COMMITTED
innodb_autoinc_lock_mode = 2
character-set-server=utf8mb4
collation-server=utf8mb4_general_ci
max-connect-errors=500
max-connections=200
[mysqldump]
socket = /opt/mysql/mysql.sock
quick
max_allowed_packet = 16M
[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates
[myisamchk]
key_buffer_size = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M
[mysqlhotcopy]
interactive-timeout
[mysqld_multi]
mysqld = /opt/mysql/bin/mysqld_safe
mysqladmin = /opt/mysql/bin/mysqladmin
#log = /var/log/mysqld_multi.log
# user = multi_admin
# password = secret