?
Solved

Move MySQL database from Windows to Linux

Posted on 2003-10-22
4
Medium Priority
?
1,298 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

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

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

This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
By, Vadim Tkachenko. In this article we’ll look at ClickHouse on its one year anniversary.
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

800 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