Ubuntu – How to move a Windows XP MySQL database to Linux

migrationMySQLUbuntuwindows-xp

What is the recommended way of moving an MySQL database from Windows (XP) to Linux (Ubuntu 9.10)?

I am thinking running mysqldump from XP then import on the Linux box – is there a better way?

Has anyone done this before, and if yes, could they please outline the steps required.

[Edit] Should have added this:
I am using mySQL v5.1 and I am using InnoDb format

Best Answer

The mysqldump approach will certainly work, and the result will be reliable. This is the way I would recommend, unless you have very good reasons not to do it like this.

Now, for MyISAM tables you should be able to simply copy the .FRM, .MYI and .MYD files to the appropriate directory corresponding to the target database (MySQL creates a dir corresponding to each database in the data directory)

For InnoDB tables, simply copying the files does not work. I have seen people do it though, for example, see this article: http://www.chriscalender.com/?p=28=1

I Hope this helps.