0

If I will use mysql/mariadb on Windows and soon I'll decide to switch to Linux or vice versa, can I use databases created in one operating system in another one without any data-loss?

Thanks in advance!

1 Answer 1

1

Check out the manual here. However, if you're transferring between 32/64 bit, then you'll have to use mysqldump, see here which gives you a text-based dump of the SQL statements you'll have to run to install your database. The commands for mysqldump vary according to whether you're using MyISAM or InnoDB, so just be aware of that.

On Linux, there are more tools available than for Windows - personally I would recommend Linux - you have mydumper (an enhanced replacement for mysqldump) as well as backup methods which aren't available on Windows such as Xtrabackup from Percona (free Open Source hot backup programme for InnoDB) and LVM snapshots. There are many other useful tools in the MySQL ecosphere that ony work (or are far easier to use) on Linux than on Windows. I know that the primary Oracle/MySQL development environment is Unix based (I did read this somewhere, sorry can't remember), either Linux or Solaris.

4
  • What is your source for the statement that migrating between 32-bit and 64-bit systems requires a dump and reload? Commented Jul 22, 2014 at 0:55
  • @Vérace, Thanks for the useful info! You saved my time)
    – user44049
    Commented Jul 22, 2014 at 8:49
  • @Michael-sqlbot - I found this - it's by B. Keith Murphy who wrote the SQL Administrator's Bible. Maybe I was wrong to use the phrase "you'll have to use mysqldump" - consider it rephrased to "it appears to be highly advisable to... ". I know it's from a while ago, but I'd still prefer an SQL text based approach to upgrading from 32->64 bit.
    – Vérace
    Commented Jul 22, 2014 at 17:01
  • +1, I agree that dump and reload is always the safest approach, but was primarily curious whether there was a specific or definitive reference we could cite, since the docs are unfortunately vague: "Like MyISAM data files, InnoDB data and log files are binary-compatible on all platforms having the same floating-point number format. If the floating-point formats differ but you have not used FLOAT or DOUBLE data types in your tables, then the procedure is the same: simply copy the relevant files." I've done binary data migrations from Solaris to Linux, but both were 64-bit. Commented Jul 23, 2014 at 1:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.