2

According to the docs, "MySQL supports replication from one release series to the next higher release series. For example, you can replicate from a master running MySQL 5.6 to a slave running MySQL 5.7". In theory, this also means that a 5.6 master can replicate to a 5.7 slave, which in turn replicates to a MySQL 8 slave. I'm assuming that the intermediate 5.7 server will write to its bin-logs in the 5.7 format, which will allow its 8.0 slave to replicate from it. Is that the case?

I'm doing this because I have a 5.6 instance that I want to upgrade to the latest mysql 8 with minimal downtime. I'd rather not upgrade incrementally, in order to only create a single short swapping downtime (the time it takes to turn of all writes on the master and promote the slave, and route traffic to it.)

1
  • 1
    Its a good plan. I'd try it. Without having tested it before I wouldn't commit to 100% success. I'm looking forward to you reporting success/failure/difficult points.
    – danblack
    Apr 1, 2020 at 0:23

1 Answer 1

1

Follow-up: we ended up doing the migration as I described in my question. We ran into no issues except minor ones related to change in behavior between version. The replication setup worked perfectly. This was done on RDS.

4
  • are you able to share the steps/config? Jul 27, 2021 at 12:49
  • The config would be dependent on your needs and your environment, we didn't really have anything special in that regard. IIRC we just switched traffic from the 5.6 DB to the 8.0 DB.
    – timetofly
    Jul 28, 2021 at 14:09
  • For others reading who wish to do this, if you used group by clauses in your software or mysql dates that default to zero, make sure your sql mode in mysql 8 removes ONLY_FULL_GROUP_BY,NO_ZERO_IN_DATE,NO_ZERO_DATE to keep errors from dropping imports (change this default in /etc/my.cnf in the [mysqld] section) Mine is as follows: sql_mode=STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION Oct 27, 2021 at 15:45
  • For my setup, I am using CENTOS 7. Your config file location may differ. While mine did not require it, others use quotes like so: sql_mode="STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION" Oct 27, 2021 at 15:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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