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: , ,