The Migration Process
Migrating a database to MySQL starts with the MySQL Migration Toolkit for Windows. The MySQL Toolkit has not yet been ported to Mac or Linux. To install the toolkit, you also need to have version 1.4.2 of Sun's J2SE Java Runtime Environment (JRE) running because the toolkit incorporates a Java agent. First, check whether you have a previous version of Java installed. If so, remove it and restart your computer. You then can download
and install the current JRE.
Double click j2re-1_4_2_08-windows-i586-p.exe to install the JRE. I chose the Windows installation instead of the 52MB offline installation file download. I installed the entire Java package including source code and development tools. Though you are not prompted to restart your machine here, it is good Windows housekeeping to reboot.
Next, download the MySQL Migration Toolkit. It has a typical, straightforward Windows installer, but the start menu lacks an uninstall option. Of course, you can uninstall the MySQL Migration Toolkit from the control panel > add/remove programs, but programs should uninstall with as few clicks as they install.
To continue, you need permission to remotely administer your MySQL database. If you haven't already, grant permissions to a user on the remote MySQL system from your Windows computer:
> GRANT ALL PRIVILEGES ON *.* TO root@'192.168.0.67' IDENTIFIED BY 'mypassword' WITH GRANT OPTION;
> FLUSH PRIVILEGES;
Alternatively, if you have the MySQL database installed on the same computer as the MySQL Migration Toolkit, use localhost as the database address, along with the necessary username and password.
Now you should be able to connect to MySQL through the toolkit's GUI (see Figure 1). The user window is split into two distinct parts: the eight-step Migration Plan and the Wizard Interface. Currently, direct migration (moving data from your Windows box to a local or an external server) is the only available option. Work is continuing on an agent-based migration scheme that will allow the MySQL Migration Toolkit to transfer data between two remote servers.
The next screen indicates whether or not your connection was successful (see Figure 2).
|Figure 2: Remote MySQL Connection Confirmed|
Continue to press Next until you complete the reverse engineering and migrate the database (see Figure 3).
|Figure 3: Remote MySQL Connection Showing All Objects|
Continue through the steps involving manual editing, schema creation, and data mapping until you get to step eight: the summary report. Once you make it to this step, chances are you've reverse engineered and migrated your database over to MySQL successfully. Review the summary report output (see Figure 4) and click Finish.
The toolkit provides verbose details of each of the eight steps as you progress through the migration. To simplify matters even further, the MySQL homepage outlines this process in video presentations for both Oracle and Access migrations.