We have a Linux server that has been running our MySQL 5.1 server. For a variety of reasons we have created a new MySQL5.5 server. What is the easiest and most efficient way to move an entire schema fr开发者_如何转开发om the Linux 5.1 MySQL to the Windows 5.5 MySQL database?
Yesterday I looked into exporting the resultset of the query as a csv and using the LOAD DATA INFILE command but that didn't work correctly. The dates didn't import correctly, there were nulls where there should have been data, I didn't look too closely at exactly what was wrong, just could tell it wasn't right.
This would be a one time operation.
Thanks, leslie
You can use mysqldump to export your entire database schema, and data as SQL commands. This dump should be easily imported into MySQL 5.5.
For Schema Migration in MySql
You can simply Use MySQL Schema Transfer Wizard prvided by MySql To open the wizard, select ->Database, ->Schema Transfer Wizard from the main menu.
Then Read the overview text and click Start the Wizard to begin.
Choose your target and source MySQL connections. After choosing and testing your MySQL connections, click Next to continue.
Choose the schemas to migrate, and click Start Copy to begin copying the selected schemas from the source to target MySQL server.
Review the Message Log to confirm that the migration completed with success. Click Next to view a summary of the results.
Click Finish to close the wizard.
This are the whole process.
For more information Check the URL, For Step By Step guidences
You can use mysqldump
to generate a sql file with all your data, then use mysql < dump.sql
to import.
Another way could be to just copy all your datafiles (usually at /var/lib/mysql/ all MYD, MYI and FRM files) to the other server. As Linux and Windows are both Little-Endian, this might work.
精彩评论