Search code examples
mysqlreplicationdatabase-replication

Mysql replication slave does not catch the master


2 days ago I started to set up y MySQL master - slave replication. I did the export form the master and imported it on the slave and all this stuff. This all just worked fine. But I had some trouble with setting up the connection from the slave to the master. So I stopped working on it in the night. Now around 1.5 days later I fixed the problem and my replication is running. The master was running all the time. But now when i run show slave status I'm ~125,000 seconds behind the master. I thought the slave will automatically download all the logged stuff from the master and will run this stuff so that they are in sync. But the value of seconds_behind_master just gets lower very slow. Is this normal? Is there a way to push all the stuff from the last 1.5 days immediately or did I something very wrong?


Solution

  • The slave would execute the binary log in a single thread as fast as it can. Depending on your servers configuration and the load on the master it is possible the slave will take a lot of time to catch up (or even lag behind even more in some cases).