Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Migrating from Linux to Windows

Status
Not open for further replies.

YOUNGCODGER

Programmer
Jul 9, 2007
102
GB

I have a MySQL database sitting on a Linux system which I need to migate to MySQL under Windows. Is there an easier way to do this rather than setting up all the tables under Windows and exporting each table to CSV (or similar) and then importing it into the new table?

Many thanks,

YoungCodger [bigglasses]
 
Use, mysqldump, it comes with all mysql sever versions.
MYSQL online Documentation said:
The mysqldump client is a backup program originally written by Igor Romanenko. It can be used to dump a database or a collection of databases for backup or transfer to another SQL server (not necessarily a MySQL server). The dump typically contains SQL statements to create the table, populate it, or both. However, mysqldump can also be used to generate files in CSV, other delimited text, or XML format.

Execute a dump of the table structure with or without data, that's your call, then import the file to the mysql on windows so it will regenerate the tables.

Mysqldump generates flat text files, you can send, or transfer to the new sever anyway you want to.

You can then execute another dump for the data if you did not include it in the first one, and feed it to the windows mysql installation.


----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Behind the Web, Tips and Tricks for Web Development.
 
One extra tip:

MySQL on Windows comes with a configuration bug. As the Windows filesystems are not case sensitive, the table names are not case sensitive either. For compatibility to unix-like systems, there is a setting to cope with this. The default on Linux is "be case sensitive", but the default on Windows is to cripple all table names to lower case. Especially for cross-platform development, this is really harmful.

Better set the setting to "be case insensitive, but keep the case as is" on Windows. This can be done by adding the line:

Code:
lower_case_table_names=2

To your my.ini file in the [mysqld] section. Do this before importing the databases.


+++ Despite being wrong in every important aspect, that is a very good analogy +++
Hex (in Darwin's Watch)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top