Solved

Move MySQL database from Windows to Linux

Posted on 2003-10-22
4
1,296 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 250 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

Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

Question has a verified solution.

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

I have been using r1soft Continuous Data Protection (http://www.r1soft.com/linux-cdp/) for many years now with the mySQL Addon and wanted to share a trick I have used several times. For those of us that don't have the luxury of using all transact…
In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller singl…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

718 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