SQL Server to MySQL conversion and synchronization.

Migrating from proprietary database engines into open-source engines is a growing trend in the industry. One of the most popular cases is to convert SQL Server databases to MySQL.

Why convert from MSSQL to MySQL?

Directly comparing SQL Server and MySQL is difficult, although you often hear ones who claim that SQL Server is better than MySQL or vice-versa.

Comparing them, especially in terms of their performance, is very subjective. Choosing between these databases should depend on developer or DBA experience and architectural or implementation requirements. You can use either of these products to build highly reliable and efficient systems. MS SQL Server and MySQL have their advantages over each other.

  • Usually, the first reason to migrate from SQL Server to MySQL is the cost.

    Microsoft has SQL Server Express edition, which is free. But it has a 10 GB maximum database size and other essential limits.

    This fact prevents SQL Server free version from being used in production.

    The MySQL community edition is free and has no limitations.

  • MySQL historically is cross-platformed. It runs on virtually all platforms, including UNIX, Linux, Windows, and macOS.

    Initially, MSSQL Server, as a proprietary database, supported Windows Operating systems only. But starting from SQL Server 2019, it can also be run on Linux and from Docker container.

However, migrating data between heterogeneous databases is not straightforward. It is not something to be taken lightly.

Datatypes Require Conversion

Data types in MySQL and SQL Server are alike but not the same.

The following table shows SQL Server data types that don’t map in 1-to-1 relationship to MySQL:

SQL Server MySQL
IDENTITY AUTO_INCREMENT
NTEXT, NATIONAL TEXT TEXT CHARACTER SET UTF8
SMALLDATETIME DATETIME
MONEY DECIMAL(19,4)
SMALL MONEY DECIMAL(10,4)
UNIQUEIDENTIFIER BINARY(16)
SYSNAME CHAR(256)

Our Types Mapping feature assists in matching target MySQL data types with their closest and relative MS SQL Server equivalent.

Find more information about mapping between MySQL and SQL Server

SQL Syntax is not the same.

While both SQL Server and MySQL are SQL based Databases, their SQL language syntax differs considerably. So valid SQL Server statements fail when executed against MySQL database.

For instance, look at the following example:

SQL Server MySQL
SELECT TOP 3 WITH TIES *
FROM car
ORDER BY price ASC
                
SELECT price
FROM car
ORDER BY price ASC
LIMIT 3                    
                

Eight reasons for using DBConvert/ DBSync to transfer data from SQL Server to MySQL.

MySQL Workbench migration tool serves data migration tasks from various databases to MySQL. But conversion from a database to MySQL is possible in ONE direction only.

As an alternative to MySQL Workbench, we offer DBConvert products that migrate and sync MSSQL to MySQL.

  1. In any combination, data migrations between the following databases are possible:

    • Microsoft SQL Server,
    • MariaDB,
    • Percona,
    • Windows Azure SQL Databases/ Azure SQL Data Warehouse,
    • AWS RDS/ Aurora,
    • SQL Cloud for SQL Server.

    Please refer to the list of available conversion and sync directions in product info cards on the right.

  2. DBConvert tool minimizes the challenges mentioned above you can meet when migrating from SQL Server to MySQL. Your database schemas, tables, views, and relations will be migrated accurately and rapidly according to the target database's requirements, preserving database consistency.
  3. Parallel migration engine of DBConvert takes full advantage of modern multi-core processors. It speeds up data migration by splitting database tables into multiple parts and processing them in parallel.
  4. You don't need to know how to write scripts to convert views from SQL Server to MySQL. Our Converter does that for you automatically.

    NOTE: We don't convert MSSQL stored procedures to MySQL.

  5. DBSync software keeps your databases in Sync with Update, Insert, and Drop synchronization features.
  6. Bi-directional synchronization helps to update data in both source and destination databases simultaneously.
  7. Trigger-based Synchronization algorithm is developed for accurate analysis of the destination database data and instantly tracking changes in both databases. Trigger-based sync method increases recurrent synchronization speed in times.
  8. Move data directly from SQL Server to MySQL or take advantage of Dump files and PHP scripts, when you don't have direct access to a target database server.
Supported databases:
  • SQL Server
  • MySQL
  • MariaDB
  • SingleStore DB (formerly MemSQL)
  • TiDB
  • Percona Server for MySQL
  • Vitess
  • Azure Database for MySQL
  • SQL Azure
  • Amazon RDS
  • Amazon Aurora
  • Google Cloud
  • ☑ Views conversion between SQL Server and MySQL
  • MySQL Dump
  • PHP Script
  • SQL Server Dump
 DBConvert for MSSQL & MySQL

Version: 4.3.3

Release Date: June 17, 2024

 DBSync for MSSQL & MySQL

Version: 5.4.9

Release Date: May 22, 2024

Try All-in-one DB migration and Sync software.

DBConvert Studio

 Version: 4.1.6

Release Date: Dec. 5, 2024

Supported databases:

  • SQL Server
  • MySQL
  • MariaDB
  • Percona
  • Oracle
  • PostgreSQL
  • Access
  • FoxPro
  • SQLite
  • Interbase
  • Firebird
  • IBM DB2
  • MS Azure SQL
  • Amazon RDS
  • Amazon Aurora
  • Heroku Postgres
  • Google Cloud

Using SQL Server to MySQL conversion and synchronization tools.

When launching the DBConvert or DBSync application in GUI mode, it seamlessly guides you through the steps to initiate database migration or synchronization:

1. Connect to SQL Server source database.

Specify the username/password and host/port parameters if your source database requires login credentials.

Connect to SQL Server source database from DBConvert

2. Connect to MySQL destination database.

Specify parameters for the destination database similar to the source, defining connection settings and username/password pairs.

Connect to MySQL target database from DBConvert

NOTE #1: Each DBConvert or DBSync tool's name comprises two different databases, enabling any specified database to operate as the source or destination. Furthermore, the same type of database can function as both the source and destination.

NOTE #2: Connections to cloud databases (e.g., Amazon RDS, Google Cloud, or Azure SQL) aren't explicitly specified in the user interface but use the same settings as traditional on-premises databases.

NOTE #3: Connections to source and target databases remain active until you close the DBConvert/DBSync application or reopen new connections.

Refer to our documentation for specific source/ destination configurations for different databases.

3. Configure database migration options.

Specify the tables, fields, indices, and views you want to transfer to the MySQL destination database by checking/unchecking the corresponding boxes.

Customize general database/ tables settings. Or configure specific table , field, index object individually when migrating data.

Explore our articles in the user's manual about Configuring database migration options. for detailed information.

The screenshot below summarizes the general features available in DBConvert software.

4. Detection of potential database migration issues. Errors and Warnings

The database enforces certain relations on the data, and on the customization step, an intelligent error checker verifies all possible data integrity and referential integrity issues. It highlights any problems before migration starts.

By default, DBConvert attempts to automatically map the database types of the source SQL Server database to the closest equivalent of the target MySQL database types. However, you can manually change the data types for the entire database globally using the "Global mapping" or individually for each field.

Explore the Intelligent error checker for more information. on errors and warnings

5. Execution. The final stage of data migration.

Initiate the conversion or synchronization process after configuring source and destination databases in the previous steps.

Click the "Commit" button to start conversion. Here, you can also monitor the migration/synchronization process.

Optionally save connection settings and configuration parameters into the session file to schedule the launching of sync or migration jobs regularly.

Execution step of DBConvert products

Explore more about the options available during the execution stage

Command line mode

Pass previously saved sessions as parameters to the Command-Line DBConvert Client. A session retains SQL Server source and MySQL target database connection settings with other specified options.

Example:

C:\Program Files\DBConvert\mssql2mysqlPro\mssql2mysqlPro_Cons.exe /Session:"Session_Name"

NOTE: First, run the software in GUI mode to create a session file with initial parameters.

Built-in scheduler.

Our applications include a built-in scheduler to run database migration and sync jobs at specified times. Set the scheduled date and time to execute job sessions automatically.

Find more Information about the built-in scheduler

DBConvert screenshot

Supported OS:

Requirements

  • Necessary privileges to write into database on the target MySQL server (this requirement is optional as there is an option to overcome the restrictions using dump file or PHP Script)
  • Necessary privileges to write into database on the target SQL Server (this requirement is optional as there is an option to overcome the restrictions using dump file)

Highlights

Explore details regarding reverse migration.