Jump to content

migration *sort of


scottybwoy

Recommended Posts

Hi,

 

I've just migrated from Windows to Kubuntu 8.10 (I doubt I'll go back its great) but didn't back up my database into a friendly sql file.

 

I still have access to my data dir under the win partition, and have tried to just move the appropriate files over to the new data directory and restart the MySQL 5.1 server, to no avail.  I've looked on google but no joy.  Anyone have any ideas, this is starting to frustrate me.  Thanks in advance.

Link to comment
Share on other sites

I don't think you can migrate between Windows and Linux...I believe they treat endian numbers differently which breaks binary compatibility.

 

If it will work, you must use the same version of MySQL if possible...at a minimum, at least stay in the same minor revision series.  In other words, you can't go from 4.x to 5.x, or even 5.0 to 5.1 in most cases, but you can go 5.0.45 to 5.0.67, and so on.

Link to comment
Share on other sites

Hmm,

 

I'm pretty sure I'm going from MySQL 5.1 - 5.1 so that shouldn't be a problem.  I found the ibdata1 files, in win data directories. however Linux seems to have just one main ibdata1 file in the data dir, where windows has individual ones for each database as well.  Therefore it doesn't look at the one for database I had before.

 

e.g.

Win

====

C:\\mysql\data..

        \mysql\ibdata1...

        \user_db1\ibdata1*...

        ibdata1

 

Linux

====

$ /usr/var/mysql/data..

        /mysql/...

        /user_db/...

        ibdata1*

 

Is there a way of merging the two ibdata1 files?  i.e. The one's with the *'s.

 

The thing you mention about the endian numbers though.  I experimented with replacing the main ibdata1 file with the windows one and restarted mysql, which when I opened it up again, displayed all the windows system databases you'd expect!  So maybe it's cleverer than you'd first think.

Link to comment
Share on other sites

What configurations do I have to pay attention too.  Widows and Linux have different ways of configuring it, Windows giving lot's more options.  As it stands I know that they both use UTF8 Encoding.  What else do I have to find out.

 

And is there a program or something for Kubuntu Linux to merge the two files?

 

Second thoughts, do you mean I can configure the Linux MySQL to look in the $ ../mysql/data/user_db/ folder for the other ibdata1 file?  If so how do I do that?  Thanks

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.