MySQL Forums
Forum List  »  Replication

Re: Replication newbie: 5.6
Posted by: Rick James
Date: December 21, 2014 04:22PM

300MB is not as bad as 300GB. Perhaps an hour would do, but allow more.

There are several ways to do it...

Plan A (Your situation is rather unusual, so I am simplifying the procedure):
1. Install 5.6 on B and C. Edit my.cnf as needed. Note especially log_bin and log_slave_updates.
2. Stop clients, stop mysqld on A.
3. Copy mysql's tree to B and C.
4. Start mysqld on B and C.
5. If B and C are new 5.6.xx versions than A, run mysql_upgrade.
6. CHANGE MASTER on B (Slave) to point to C (Master).
7. Test: Run some quick SELECTs; run some harmless writes on C and check that they got to B.
8. Adjust the clients to point to C, then turn them on.
9. Keep A around for awhile, just in case. Then retire it.

Plans B, C, etc
The discussions you find elsewhere will also work, using mysqldump, MySQL Tools, XtraBackup, etc.

The downtime of Plan A is steps 2-8. The bulk of the downtime is:
* Running things carefully.
* Copying 300MB twice. This could be decrease to "once" at the expense of some complexity.

If the server connections are high speed (ie, LAN, not WAN), the don't bother compressing the copy in step 3; the extra time for compressing is likely to be more than the bandwidth time.

Also, in step 3, two direcories (databases) could be problematical: mysql and performance_schema. The GRANTs are in mysql; some perf stuff is in the other. I believe (without trying it) on 5.6 that you can safely copy both from one instance of 5.6.xx to another instance of the same version. It might even work if they are different versions of 5.6. Step 5 should fix any issues.

If something goes wrong, look at (and show us, if necessary):
SHOW SLAVE STATUS;
SHOW MASTER STATUS;
Diffs in my.cnf files
mysqld.err

Options: ReplyQuote


Subject
Views
Written By
Posted
1758
December 18, 2014 06:25PM
892
December 19, 2014 03:10PM
872
December 20, 2014 12:57PM
Re: Replication newbie: 5.6
885
December 21, 2014 04:22PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.