Quantcast
Channel: StackExchange Replication Questions
Viewing all articles
Browse latest Browse all 17268

MySQL master is creating relay-bin logs?

$
0
0

I have three database servers. One MASTER and two SLAVES. Each of the slaves is operating perfectly, holding onto only the current relay-bin log file and then purging it automatically when it is done. I was working on setting up a utility on the master to clean out old binary log files older than one month when I discovered it also had a full list of relay-bin logs?

Is it normal for the master to have both the binlog and relay-log files? I assumed the slaves read the master's binlog files, and created the relay-bin files themselves locally. I verified that the master server is not also set as a slave (although I would assume that would cause a major error).

So, if the master is supposed to have both sets of logs, how do you purge the relay logs? The "PURGE BINARY LOGS..." syntax does not seem to have any effect on the relay logs, and from what I have read, MySQL alves are supposed to handle purging the old relay logs themselves.

Maybe this is a config issue. In my MASTER server's my.cnf I have:

# REPLICATION #
server-id                      = 101
log-bin                        = /var/lib/mysql/binlog
binlog_format                  = MIXED
relay-log                      = /var/lib/mysql/relay-bin

Maybe on the master, I should not be specifying the relay-log variable? Maybe that should only be on a slave server?

Thanks.


Viewing all articles
Browse latest Browse all 17268

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>