[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Move MySQL database from Windows to Linux

Posted on 2003-10-22
4
Medium Priority
?
1,300 Views
Last Modified: 2008-03-04
How shall I move a MySQL database from Win2K to Linux-RH9.  Never done it and haven't seen 'the' recommended method.

Windows2000 - MySQL 4.0.15 - phpMyAdmin 2.5.3
Linux RH9 - MySQL 3.23.58 - phpMyAdmin 2.5.3
0
Comment
Question by:speyfisher
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 17

Accepted Solution

by:
Squeebee earned 1000 total points
ID: 9602762
Here is how I do it:

from the bin directory under the mysql directory, on a command line:

mysqldump -u <username> -p<password> --quick <databasename> | mysql -h <redhatIP> -u <redhatuser> -p<redhatpassword> <databasename>

You will need to have already created the database on teh RH box, but not the tables. Note that there is no space between -p and the password, if your password is 12345 this would be -p12345.

This will dump the tables across the network. In theory the tables are portable but why bother with potential problems?

Note that under Linux table names are CaSe SenSitIvE, unlike in Windows.
0
 
LVL 4

Author Comment

by:speyfisher
ID: 9604819
Great--  I moved all my databases over my network to RH9 without a hitch.  

If I could not use this method over a network, would you illustrate how I'd install a dump ... a .sql  or  .gz for example on the Linux machine?
0
 
LVL 17

Expert Comment

by:Squeebee
ID: 9606236
On Windows:

mysqldump -u <username> -p<password> --quick <databasename> > dump.sql

Move dump.sql to Linux machine.

On Linux:

mysql -u <redhatuser> -p<redhatpassword> <databasename> < dump.sql

Just introduces a file as the middleman is all.
0
 
LVL 4

Author Comment

by:speyfisher
ID: 9608734
thanks!
0

Featured Post

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating and Managing Databases with phpMyAdmin in cPanel.
In this blog post, we’ll look at how using thread_statistics can cause high memory usage.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question