简体   繁体   中英

mysql: When exactly the statement “Start binlog_dump to slave_server” logged in to the master error log

Recently, I have observed the below statement in the master server's MySQL error log many number of times.

"started bin_log dump to slave server"

I would like to know all the possible cases of when exactly this will be logged in the error log.

How connection failure between master and slave will impact this to be logged into the error log.

I suspect personally when we hit "START SLAVE" on the slave server, But it is not as I tested this.

Thanks in advance.

Exact message is this: Start binlog_dump to slave_server

In the source code this string is saved in the logfile when this function is called: mysql_binlog_send

With a bit of research, I see that just before this function is called, changes the slave state to this: Requesting binlog dump and in the MySQL reference manual says that this state is set just when the slave connects with the master.

So, exactly, this message appears when the slave connects with the master.

So it seems that the slave loses connection with the master and then reconnects.

Is this and error or not? I suspect "started bin_log dump to slave server" is not the entire log line if it is an error. Please add an actual snippet from the log in question of the repeating notice.

If replication looks like its working fine, this isn't an error. Non- errors such as servers start and stopping and slave connection status get logged to the MySQL error log. You can override the default logging levels to lower how much and what gets logged:

http://dev.mysql.com/doc/refman/5.5/en/replication-options-slave.html

Look at the --log-warnings configuration option

I suspect this occurs when you change a slave to a master or when a slave server restarts and try's to reestablish a connection.

I meet the same condition like that

160615 15:40:25 [Note] Start binlog_dump to slave_server(1401), pos(mysql-bin.000020, 219311193)
160622 15:56:58 [Note] Start binlog_dump to slave_server(1401), pos(mysql-bin.000046, 350644600)

when i stop the slave, and start slave again ,the master's mysql error logs would print the note log.

This is nothing to be care. It just means that the slave server (server id is 1401) is begin to connect the master.

Need to be noted that if your masters' mysql error log prints the note log frequently. you will check :

  1. whether the network is stable
  2. if the master have one more slaves ,check the slaves whether have the same server-id.

that's all.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM