We currently have a physical db server on premise, running mySql version 5.6. We have another instance set up on an Azure virtual machine, as we are in the process of migrating our data center to Azure.
We don’t have a dedicated DBA, and we are following the steps in this tutorial from the mySql site:
We keep failing on the 2nd step of copying the data directory, is there a workaround for this, or a better way to go about replicating?
Copying data directory would work if you are using the same version of MySQL. As per you question, you are copying from 5.6 to 5.7, so this way wouldn’t work.
Now: you mentioned you are “migrating”, and the steps you are following are for “creating new slave”!
If you want to “migrate”, a better way is the following:
- Make a full backup using mysqldump, or other “logical” backup tools (as opposed to physical copy of the files)
- restore this backup on your destination server