MySQL Import Export

I recently migrated one of our MySQL 3 databases to MySQL 5. I needed to export data from MySQL 3 and import it to MySQL 5. To export the data I had to do the following:

mysqldump -u username -ppassword database_name > FILE.sql

FILE.sql is just a ascii file with create and insert SQL statements. You can import this file like this:

mysql -u username -ppassword database_name < FILE.sql

I read about MySQL Migration Toolkit 1.0 but I had trouble using it. When I used the Migration Toolkit the JVM would crash and produce a hs err log file.

Technorati Tags: , ,

Related posts:

  1. MySQL Admin
  2. Import Script, Import CSS, Import PHP
  3. MySQL Optimization Tutorial
  4. Desc SQL Tables
  5. Repair A Crashed MySQL Table

This entry was posted in SQL, TechKnow. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*