Easy way to migrate MS SQL to MySQL |
| Download | Buy | FAQ | Troubleshooting | Release Notes | Latest version 8.5 released 04/14/2025 |
MSSQL-to-MySQL is a tool to automate database migration from MS SQL to MySQL on-premises or cloud. It supports MariaDB or Percona. Depending on privileges on the target server user can either migrate MS SQL data into new database or overwrite the contents of an existing MySQL database.
Features
|
Once the profile is created with conversion settings, user can run the program by double-click on the profile description (.m2s) file in Windows Explorer. This will launch MSSQL-to-MySQL wizard loading the conversion settings from profile. The user will be forwarded right to the screen with conversion progress.
The process of MSSQL to MySQL database migration consists of the following steps:
On this wizard page users should select the migration scenario:
See Connect to MySQL Server article for more information.
See this article for information about how to import script files to MySQL server.
Enter the name of SQL Server or Azure SQL instance in MS SQL Server field or leave it empty if connecting to the local server. Custom port (other than 1433) can also be specified in this field as follows:
Sql_server_name,1234
where 1234 is the custom port. Then select the type of authentication to use when connecting to SQL Server:
If connection failed read How to configure SQL Server article for possible workaround.
If you are connecting to Azure SQL, see How to connect to Windows Azure SQL article for related information.
By default local connection mode is uses, it is indicated by Local radio button.
To connect remotely, select Remote radio button and specify host and port values.
Host can be either network name or IP address. Port is necessary only if it differs from
the default 3306. If you need to specify custom port for local connection,
select Remote and type localhost or 127.0.0.1
into Host box.
Finally, user name and password are entered. If the target server allows anonymous connection, these fields can be empty.
MySQL user should have sufficient privileges to create new database on the target server. Otherwise, it is only possible to import MS SQL data into an existing database.
In cause of error on this stage, refer to the following articles for workaround:
» Can't connect to MySQL server on <host name or IP>
» The program does not support authentication protocol...
On this wizard page users should specify formatting settings for the resulting script file:
LOCK TABLES privilege and
SELECT privilege on the involved tables. In MySQL 3.23 and
earlier user also needs to have SELECT, INSERT,
DELETE and UPDATE privileges for the tables.
Other options are self-explained. See Import MySQL dump files article to learn how to import script file to the database server.
Existing MySQL script file is always overwritten.
Specify log file to enable the program write execution traces. It may be used to analyze possible error messages and get more control over the conversion process. If no log file is specified, the logging is disabled.
This wizard page is deisgned to customize the database migration using the following settings:
Also, here you can specify the MS SQL schema to migrate only tables belong to this schema. Or select "Full Replication" to access all tables of the database. In this case, all table names include schema name as a prefix.
To add new table select it in Available tables list
and click Add button (or double-click the highlighted item).
Use Add all button to add all available tables. To remove
an item from Selected tables list highlight it and click
Remove button. Use Remove all button to remove all
items from Selected tables list box.
Push Add Query button to add SELECT-query filtering MS SQL
data that will be migrated to MySQL server. See
Using Queries article for the further
information.
The converter allows to edit table or query before migration. For this purpose,
double click the corresponding item in Selected tables list box.
If it is a table, dialog box appears to edit table attributes and to define custom
type mapping. See Edit Table article
for the further information.
If selected item is a query, you will see dialog box to edit SQL-statement of the query.
To add new MSSQL view for migration, highlight it in "Available queries" list and click "Add" button (or double-click the highlighted item). Use "Add all" button to add all available SQL Server views. To remove an item from "Selected queries" list, highlight it and click "Remove" button. Use "Remove all" button to remove all items from "Selected queries" list.
MSSQL-to-MySQL does not recognize dependencies for views, user should reorder them so that core views go before dependent ones. Highlight the view and use up and down arrows on the right part of the wizard page to change order of conversion.
The converter handles about 90% of syntax constructions involved into MS SQL
CREATE VIEW statements. Some of the translation rules are specified
in this article.
SQL Server and MySQL have similar sets of data types, however some of them may require safe mapping. The converter follows these mapping rules:
| SQL Server | MySQL |
| bit | tinyint(1) |
| char(length > 255) | text |
| datetime2 | datetime |
| datetimeoffset | timestamp |
| geography | longtext |
| image | longblob |
| money, smallmoney | decimal(18,2) |
| nchar(length > 255) | text |
| ntext | longtext |
| nvarchar(length > 255) | text |
| smalldatetime | datetime |
| text | longtext |
| time2 | time |
| timestamp | longblob |
| uniqueidentifier | varchar(36) |
| varbinary(max) | longblob |
| varchar(length > 255) | text |
| varchar(max) | text |
| xml | longtext |
See full list of safe types mapping
The converter supports about 90% of syntax constructions involved in MS SQL queries. Below there is example of conversion results for the query with few calls of SQL Server embedded functions having no direct equivalent in MySQL.
Here is how it looked into Microsoft SQL:

And this is the resulting view in destination MySQL database:

When using a Virtual Server hosting customers may not have sufficient privileges to create new databases on the target MySQL server. For this case we recommend the following approach:
When you complete these steps, the entire contents of the source MS SQL database will be imported into the specified MySQL database.
Still not sure the program fits your needs? Try free demo version of MSSQL-to-MySQL with limited features. It will allow you to convert only 50 records for each database table, it does NOT convert queries/views and foreign keys. Test the quality of the demo and come back to place an order if satisfied with the results.
Select the most suitable option below and click the corresponding BUY NOW link.
MS SQL to MySQL converter is covered by 30 day money-back
guarantee
| Single-user License | $79 | BUY NOW |
| Corporate License | $199 | BUY NOW |
| MSSQL-MySQL Sync bi-directional incremental sync between SQL Server and MySQL |
$79 | BUY NOW |
| MySQL Migration Toolkit software pack to convert any data source to MySQL and vice versa |
$149 | BUY NOW |