You are on page 1of 10

Migration from MSSQL to MySQL

Why Migrate?
Below are a few reasons why you might want to consider migrating Microsoft SQL Server to a MySQL
database:

1. Reduced Cost: In order to avoid huge licenses and support for MS SQL Server. In
MySQL, even if you decide to use the corporate version of MySQL, it is cheaper.
2. Supports Major Operating Systems (OS) and Platforms:  Unlike MS SQL, MySQL runs
efficiently on all of the major OS and platform combinations including Windows, Linux
and Solaris.
3. Installation and Configuration: MySQL usually takes 15 minutes or less for
downloading and installation. To make the installation and configuration process much
easier 
4. Flexibility: SQL Server uses a single storage engine. However, MySQL provides
developers great flexibility to choose different storage engines for different table types.

Top Tools for Migration:

1. Data Loader
2. MySQL Workbench (open source)
3. MSSQL Import & Export Tool

Tool I am Using for Migration:

For migration purpose I am using MySQL Workbench. This tool is designed to save DBA and
developer time by providing visual, point and click ease of use around all phases of configuring
and managing a complex migration process:

 Database migrations: Allows migrations from Microsoft SQL Server, Microsoft


Access, PostgreSQL, Sybase ASE, Sybase SQL Anywhere, SQLite, and more.
 Manage Migration Projects: Allows migrations to be configured, copied, edited,
executed and scheduled.
 Source and Target selection: Allows users to define specific data sources and to analyze
source data in advance of the migration.
 Object migration: Allows users to select objects to migrate, assign a source to target
mappings where needed, edit migration scripts and create the target schema.
 Version Upgrades: Using migration, users can easily move databases off
older MySQL versions to the latest.
Pre-Requisite for Migration:

 MySQL must be installed on the system with default configuration.


 Ensure that we can connect to both destination MySQL server database, and source
MSSQL Server database with appropriate privileges that are required for migrating the
data across.

 Before starting the MySQL database migration wizard in Workbench, we need to ensure
that ODBC drivers are present for connecting to the source Microsoft SQL Server
database, as it is not bundled with Workbench.
 Verify that the max_allowed_packet option in the MySQL server is sufficient for the
largest field to be migrated.

Migration Process

Step 1:
To start the migration process, on the MySQL Workbench main screen, go to Database->
Migration Wizard.
Step 2: Selecting the source and target database

First, define the connection options for the initial Microsoft SQL Server database. Select
“Microsoft SQL Server” from the drop-down list of database systems. On the Options tab, select
DSN and specify the user’s name in the database.

N
ext, define a target connection to a MySQL database in the Options tab. And test the
connection.

Step 3: In the next step, MySQL Workbench will connect to our SQL Server to fetch a list of the
catalogs and schemas.
You can select a specific schema that you like, migrate (or select all), and you can also
specify a custom schema mapping in the target MySQL database.

Step:4 If everything went fine, we’ll have a list of objects to be migrated.


Step 5: Start Migration Process.
If everything went fine, we can continue by selecting how we want to create the migrated
schema in the target. We’ll use the default “Create schema in target RDBMS” option.

Now, let’s check the creation schema process.


Step 6: At this point, we’ll have the database structure, but we don’t have the data
yet. Now, we’ll select how we want to copy the data in the MySQL Server. We’ll use
the “Online copy of table data to target RDBMS” option.
And we can monitor the copy process from the MySQL workbench
application.
In the last step, we can check the migration report and finish the task.

You might also like