1. 打开/etc下的my.cnf文件
2. 编辑它,添加内容:
log_bin=binary-log #二进制日志的文件名
server_id=1 #必须指定server_id,这是MySQL 5.7.3以后的要求
binlog-do-db=yrld #备份的数据库名,可以是多个
binlog-do-db=website
binlog-do-db=yrldgold
完整内容:
--------------------------------------------------------------------------------------
# For advice on how to change settings please see
[mysqld]
#
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innod