Being extremely popular database management system for the popular LAMP stack (Linux, Apache, MySQL, PHP/Perl/Python), MySQL is less popular then Microsoft SQL Server on Windows platforms. On the other hand, a lot of users works with MySQL on Windows for development, intending to deploy it on the production platforms running on Linux or Unix server. In addition to decreasing total cost of ownership, this is the reasons to migrate from SQL Server to MySQL.
These two relational DBMS may be considered as advanced frameworks providing lot of capabilities for administration and development purpose. Also, they have many similarities in features and syntax of SQL statements that makes it relatively easy to switch from one system to another. The following infographics illustrates the major stages of SQL Server to MySQL database migration:

At the same time, manual migration is always tedious and complicated, especially for large data warehouses incorporating business logic units. It is reasonable to employ special software known as SQL Server to MySQL converters that can partially or fully automate this process.
Below we will explore three major stages of the database migration and review one of the most popular software tools to make it smooth and safe.
Step 1: Inventory of the source database
Main goal of this stage is to document all resources and processes of SQL Server database that must be migrated. An automated procedure of reverse engineering to track all appropriate metadata for conversion could be a good approach to the task. There are many data modeling tools such as Sybase’s/Quest’s PowerDesigner and Embarcadero’s ER/Studio available on the software market.
Pay special attention to database logic entries such as stored procedures, functions and triggers that can hardly be converted in fully automated mode. Also, remember that SQL Server synonyms, some of proprietary functions, dynamic T-SQL and most elements of the security system have no direct equivalent in MySQL. Those features require changing database architecture during the migration.
Step 2: Build the destination database
Once the SQL Server database has been inventoried, it is time to build the target MySQL database. This step includes converting the metadata and related properties (for instance, datatypes and default values) into MySQL equivalents. It can be frustrating and error-prone when doing manually due to large amount of entries to process for corporate scale databases.
Fortunately, there are many dedicated migration software and generic data modeling tools that provide capabilities to convert SQL Server schemas to a MySQL with minimal efforts. Automated database converters can save a lot of time and efforts at this stage. Also such tools help to avoid human errors leading to data loss or corruption, therefore it is absolutely must-have component of every migration strategy.
Step 3: Data Migration
After the source metadata is converted to the target format and loaded into the database, the next step is data migration. The most popular approach to SQL Server to MySQL data migration is known as “extract, transform, load” (ETL). It is implemented in most of free and commercial converters providing enough power and flexibility to build custom efficient migration for volume of data. Customization of data migration includes aggregation, filtration, transformation and other options of pre-processing to give users as much flexibility as possible.
Basically, there are four common techniques of data migration:
- Snapshot – the most straight forward method providing all the source data is extracted as a single chunk. This approach demands a lot of RAM resources and may cause system overhead for large databases.
- Piecewise – splits all data into fragments of predefined size and then processed those fragments one-by-one.
- Parallel snapshot – similar to the previous method, except it processed data fragments simultaneously using multi-threaded algorithms
- Incremental migration (changed data replication) – this method provides permanent scanning the source database for changes and then replicates only modified data to the target database.
Migration Tools
One of the most popular free tools to migrate data between those two DBMS is Microsoft Data Transformation Services (DTS) in early versions of SQL Server and Integration Services for later product releases.
For those database specialists who prefer to work with command line, there is method of SQL Server to MySQL data migration based in combination of the SQL Server bulk copy program (BCP) and MySQL LOAD DATA INFILE statement. According to this approach, the source data is extracted in CSV format via BCP and then loaded into MySQL database using LOAD DATA INFILE with the same delimiter being used for CSV file.
Besides semi-automated methods specified above, there are dedicated commercial tools that are able to thoroughly automate the database migration. One of such tools is SQL Server to MySQL converter developed by Intelligent Converters software company. The program processes schemas, data, constraints, indexes, foreign keys and views handling properly all the required transformations. Flexible data pre-processing is implemented via migration result of SELECT-queries that can be used to modify, filter and merge the data being migrated. Command line support provides extra flexibility of scripting and scheduling the conversion process.