I'm going from a single, non-GTID MySQL 5.6 server to a master-slave replicated setup on 5.7 (could be 8.0 too) with GTID on CentOS 7.x. Some details: format = ROW, minimal logging, file_per_table InnoDB
What's the best path to make the switch? The original server is in production, and I can stop it for discrete moments without much disruption.
If I set the new master and slave with replication from scratch and then import the database dumps (plain, no GTID data here) to the master, everything will get replicated right away, right?
My plan is this:
- Stop the app associated with a database (WordPress blogs mainly, front-end caching can keep downtime unnoticed).
- mysqldump individual database
- Import dump into new master (replication propagates data to the slave)
- Redirect app to new master, restart app
The slave will act as an emergency replacement and backup source while the master will bear the brunt of reads and writes. If load justifies it, maybe I will use the slave for reads and the master for writes in the future.
Am I too off in my plan?