Home >
Documentation >
SQL Server to MySQL
SQL Server to MySQL Migration via MySQL Workbench
MySQL Workbench is a cross platforming tool having user-friendly graphical intereface
designed for database administrators and developers. It provides a lot of capabilities
for data modeling, SQL development and many other administration tasks. One of such
routines is database migration from SQL Server to MySQL.
Prerequisites:
- Sufficient privileges on both databases for the task.
- MySQL Workbench has access to both databases.
- Configured ODBC drivers.
How to configure the ODBC driver for database migration:
- Push Windows start button and navigate to the 32-bit or 64-bit ODBC drivers (depending
on your system)
- In the appeared dialog box open "System DSN" tab and click "Add"
button
- From the "Data Sources" drop-down select "SQL Server" and click
"Finish"
- In the "Connect a New Data Source to SQL Server" window provide necessary
connection parameters. You can find SQL Server name from the "Connect to Server"
window in SQL Server Management Studio or by running
SELECT @@SERVERNAME
in the SQLQuery. Click "Next".
- Keep the Windows Authentication as "SQL Server authentication method" and
click "Next".
- Select "Change the default Database" to actual MySQL database name and
click "Next".
- Click "Finish" and then "Test Data Source".
Finally, this is a time to migrate SQL Server to MySQL through the following steps:
- Open the MySQL Workbench and navigate to "Database" > "Migration
Wizard". Click "Start Migration" button.
- On the "Source Selection" page specify SQL Server connection details.
Test connection if this is necessary and click "Next".
- Enter MySQL connection details on the "Target Selection" page.
Test connection if this is necessary and click "Next".
- On the "Schemas Selection" page choose the schemas you want to migrate
and name mapping method.
- On the "Source Objects" page you can manage Table, View, and Routine
objects selected for migration.
- The next "Manual Editing" page is designed to review and edit migrated
objects.
- On the "Target Creation Options" you have to specify how to create schemas:
by either adding it to the target RDBMS, creating an SQL script file, or both.
- The next page "Create Schema" contains the complete log of schema creation.
- The next page "Create Target Results" contains list of generated objects
with the related error messages if any exist. On this page the migration code may also
be inspected and edited. For edit purpose select the object, edit the query code and
then click "Apply".
- On the "Data Transfer Setup" page you can set up the following options of
SQL Server to MySQL data migration:
- Online copy of table data to target RDBMS (recommended)
- Create a batch file to copy the data at another time
- Create a shell script to use native server dump and load abilities for fast migration
- Click "Next" to lauch SQL Server to MySQL data migration.
Have any questions? Contact us