I'm trying to get replication set up between two servers with the eventual goal of switching the slave over to be the master (I'm trying to upgrade the hardware stack with as little interruption as possible as well as upgrading from 5.7 to 8).

Current server is not configured as a master and does not have binary logging enabled.

Been readying different methods of doing it and the best I've come up with:

  1. Stop the server
  2. Export the database
  3. Restart the server with Binlog enabled
  4. Import the database to new server
  5. Restart with Master-slave relationship enabled once the full database is imported

My understanding is that the slave will be able to use the binlog to catch up the transactions to current, and I'm hoping this will lead to minimal down time. Having never tried it before I just wanted to know if there's a better way to accomplish this and\or if it will work as expected (especially with the binlog)

1 Answer 1


You should go in below sequence,

  1. Restart Master Server for enabling the binary logs.
  2. Take backup from Master server with readings(to start replication)
  3. Restore backup on Slave server.
  4. Then start the replication on Slave server from taken readings.

Note: If you are doing replication from 5.7 to 8.0 make sure your default character is same on both server & make sure you have removed all the deprecated features declared in 8.0 version from (Master) 5.7 server + you don't use any of database keywords in your Database objects.

  • Awesome ty for the insight on the readings part, and I made sure to run through all the sanity checks on the 5.7 -> 8.0 upgrade + did a dry test with no data tables w\ the same schema so I think I'm good there Commented Sep 7, 2021 at 17:22
  • Question re: reserved keywords, there are some (it's a really old project) but I've made sure to run through the codebase and wrap them all in ticks (which I know does "work" in 8.0). Is the reserved keyword going to cause an issue with the upgrade itself or just with queries that haven't been sanitized? Commented Sep 7, 2021 at 18:14
  • if they are wrapped under backquote then there is no issue. Still you can run upgradechecker utility in MySQL shell. Commented Sep 8, 2021 at 5:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.