Migrating from phsyical Mysql to virtual instance

Posted on

Question :

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?

Answer :

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:

  1. Make a full backup using mysqldump, or other “logical” backup tools (as opposed to physical copy of the files)
  2. restore this backup on your destination server


Leave a Reply

Your email address will not be published. Required fields are marked *