I don't know if I fell on a bug or a feature, I read the documentation several times but haven't found the information.
I have two MySQL servers, both on 8.0.15 and hosted on a Windows Server (x64). I'll name these
Out of 5 databases on SRV1, I want to replicate only 3 of them on SRV2.
I setup the replication filter with the following query, made to ignore the two remaining databases, so that in the future the replication process will pickup any new database created.
CHANGE REPLICATION FILTER REPLICATE_IGNORE_DB = (ignore1,ignored2);
The replication process worked as expected and I saw the three databases created and fully replicated on
SRV2. So far so good.
The result of
SHOW SLAVE STATUS \G; was correct, showing
[...] Replicate_Do_DB: Replicate_Ignore_DB: ignore1,ignore2 [...]
But a wild Windows Update appeared. And made
SRV2 restart during the night. I detected today that the replication process stopped because the replication user tried to do a query on
SHOW SLAVE STATUS \G; confirmed it, my replication filters are not here anymore.
[...] Replicate_Do_DB: Replicate_Ignore_DB: [...]
Wanting to troubleshooting it, I put again my replication filters, restarted the slave process, waited that
Seconds_Behind_Master went to 0. I then asked Windows to stop the MySQL service, and start it again, as it would do on a normal OS restart.
Once again the replication filters got lost, and the slave process stopped because it's trying to replicate a database that doesn't exist on
Before going on 8.0.15, I went on 5.7 during 3 years with the exact same setup, but never encountered a single issue like that during server restarts. Is it something intended (that I would have missed in the 8.0 release notes?) or a bug in my configuration?
I know that I can fix it by adding the
--replicate-ignore-db argument to the MySQL service binary path, but I still want to know if there is another way.