mysql mysql-bin 不记录_mysql-bin 开启的时候不记录问题,跟配置文件有关

[mysqld]

character-set-client-handshake=FALSE

character_set_server=utf8mb4

collation-server = utf8mb4_unicode_ci

port=3306

innodb_file_per_table=1

basedir=/usr/local/mysql5

datadir=/data/data/mysql

#basedir=/usr/local/mysql5.6

#datadir=/data/data/mysql5.6

#basedir=/usr/local/mysql5.5

#datadir=/data/data/mysql5.5

#socket=/tmp/mysql.sock

socket=/var/lib/mysql/mysql.sock

secure-file-priv="/tmp"

core_file

#skip-grant-tables

innodb_force_recovery=0

innodb_purge_threads=0

innodb_file_format=Barracuda

max_allowed_packet=100M

connect_timeout =2880000

wait_timeout=2880000

skip-name-resolve

back_log = 1024

max_connections = 1024

max_connect_errors = 6000

open_files_limit = 65535

table_open_cache = 128

#max_allowed_packet = 4M

binlog_cache_size = 1M

max_heap_table_size = 8M

tmp_table_size = 16M

read_buffer_size = 2M

read_rnd_buffer_size = 8M

sort_buffer_size = 8M

join_buffer_size = 8M

key_buffer_size = 32M

thread_cache_size = 64

query_cache_type = 1

query_cache_size = 8M

query_cache_limit = 2M

ft_min_word_len = 4

log_bin = mysql-bin

binlog_format = mixed

expire_logs_days = 30

server-id=1

log-bin = mysql-bin

#log-bin=mysql-bin.log

#binlog-do-db =microcosm

#replicate-do-db =microcosm

binlog-ignore-db=mysql

replicate-ignore-db=mysql

default-storage-engine=INNODB

sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

#server-id=1

#max_connections=151

query_cache_size=0

event_scheduler = 1

ft_min_word_len = 1

# Disabling symbolic-links is recommended to prevent assorted security risks

symbolic-links=0

# Settings user and group are ignored when systemd is used.

# If you need to run mysqld under a different user or group,

# customize your systemd unit file for mariadb according to the

# instructions in http://fedoraproject.org/wiki/Systemd

[mysqld_safe]

log-error=/data/data/mysql/mariadb.log

pid-file=/data/data/mysql/mariadb.pid

#log-error=/data/data/mysql5.6/mariadb.log

#pid-file=/data/data/mysql5.6/mariadb.pid

#log-error=/data/data/mysql5.5/mariadb.log

#pid-file=/data/data/mysql5.5/mariadb.pid

[client]

default-character-set=utf8mb4

#socket=/tmp/mysql.sock

socket=/var/lib/mysql/mysql.sock

[mysql]

default-character-set=utf8mb4

#socket=/tmp/mysql.sock

socket=/var/lib/mysql/mysql.sock

上边这些基本都是优化项:

server-id=1

log-bin = mysql-bin

#log-bin=mysql-bin.log

#binlog-do-db =microcosm   --binlog-do-db:指定mysql的binlog日志记录哪个db

#replicate-do-db =microcosm

binlog-ignore-db=mysql

replicate-ignore-db=mysql

default-storage-engine=INNODB

Replicate_Do_DB:参数是在slave上配置,指定slave要复制哪个库

在master上设置binlog_do_弊端:

1、过滤操作带来的负载都在master上

2、无法做基于时间点的复制(利用binlog)。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值