---
title: "Migrate SQL Server to MySQL in your browser"
description: "Migrate a SQL Server database to MySQL: convert the script SSMS generates into one with the same tables, keys and data, and a report of every change."
canonical: https://intosql.com/sql-server-to-mysql
last_updated: 2026-10-15
---

# Migrate SQL Server to MySQL in your browser

Drop the script SSMS's Generate Scripts writes with schema and data, as .sql or .sql.gz, UTF-16 or UTF-8, and download a script for MySQL with the same tables, keys, indexes and data. Every value MySQL can't hold as it is, and every object it doesn't carry, is listed in the report.

[SQL Server to MySQL migration guide](https://intosql.com/docs/migrations/sql-server-to-mysql)

[SQL Server to MySQL data types](https://intosql.com/docs/types/sql-server-to-mysql)

## What changes from SQL Server to MySQL

Each row is a rule the converter applies, with the report line it writes when the rule changes something in your data.

| In SQL Server | In MySQL | Report line |
| --- | --- | --- |
| bit | tinyint(1) |  |
| char(n), varchar(n), nchar(n), nvarchar(n), varchar(max), text | char(n), varchar(n) up to 1024 characters, text types beyond |  |
| decimal(p,s), money, smallmoney | decimal(p,s); money as decimal(19,4) |  |
| datetime, datetime2, smalldatetime | datetime(p) |  |
| datetime2(7), time(7) and datetimeoffset(7) | six digits of a second, the seventh cut | `fraction_cut` |
| datetimeoffset | datetime(p) in UTC | `moments_as_utc` |
| time | time(p) |  |
| dates before the year 1000 | NULL | `date_out_of_range` |
| json (SQL Server 2025) | json |  |
| uniqueidentifier | char(36) |  |
| binary, varbinary, image | binary(n), varbinary(n) and blob types |  |
| geometry, geography | blob with SQL Server's own bytes | `spatial_as_native` |
| rowversion, timestamp | blob, empty | `rowversion_empty` |
| xml, sql_variant, hierarchyid, vector | longtext | `type_replaced` |
| collations that ignore case (_CI_) | exact comparison (utf8mb4_bin) | `case_insensitive_collation` |
| IDENTITY | AUTO_INCREMENT, continuing after the highest id |  |
| IDENTITY columns that don't lead the primary key | a plain integer | `counter_dropped` |
| CREATE SEQUENCE | not created | `sequence_not_converted` |
| computed columns | generated columns, STORED when PERSISTED, VIRTUAL otherwise |  |
| computed columns with functions MySQL lacks | a plain column | `generated_not_translated` |
| defaults with functions MySQL lacks, and NEXT VALUE FOR | no default | `default_not_translated` |
| CHECK constraints | translated |  |
| CHECK constraints with functions MySQL lacks | not created | `check_skipped` |
| CHECK constraints added WITH NOCHECK or disabled | not created | `check_not_enforced` |
| filtered and columnstore indexes | not created | `index_skipped` |
| foreign keys | foreign keys, loaded with FOREIGN_KEY_CHECKS=0 |  |
| foreign keys to tables the dump doesn't create | not created | `foreign_key_skipped` |
| tables on a partition scheme | one table with every partition's rows | `partitions_dropped` |
| temporal tables (SYSTEM_VERSIONING) | two tables: the current rows and the history | `system_versioning_dropped` |
| schemas | one database, tables named after their schema first | `schemas_merged` |
| NOT NULL columns with values that become NULL | NOT NULL dropped | `not_null_relaxed` |
| views, functions, procedures, triggers, synonyms, types and partition functions | listed in the report | `not_converted_objects` |
| scripts without CREATE TABLE (data only) | types read from the values | `no_schema` |
| expressions in INSERT values | NULL | `expression_value` |
| types IntoSQL doesn't know | longtext | `unknown_type` |
| NUL characters in text | kept |  |
| text that isn't valid in its encoding | the bad bytes as the replacement character | `invalid_utf8_replaced` |
| text decoded twice (Ã±) | copied as it is | `mojibake_suspected` |

## Load the script into MySQL

The script creates the tables, copies the rows, then adds keys, indexes and foreign keys, so it loads fast and stops at the first error.

```shell
mysql --default-character-set=utf8mb4 mydb < sql_server.mysql.sql
```

Foreign keys are created as the dump declares them, with FOREIGN_KEY_CHECKS=0 while the rows load, so a row that points to a missing row doesn't stop the load.

For a large dump, run the client on the same machine as the server, and raise max_allowed_packet if a single row is very large.

IntoSQL Pro loads the file straight into MySQL from the desktop app or the command line, without writing a script.

## Dump SQL Server for the best result

The converter reads what the dump holds. These options keep more of your data in it:

- In SSMS, right-click the database, Tasks, Generate Scripts, and pick the tables. dbatools, mssql-scripter and other tools built on the same library write the same script.
- Under Advanced, set Types of data to script to Schema and data. A script of the schema alone has tables without rows.
- Save it as Unicode, SSMS's default, or as UTF-8: both are read the same way, and gzip works too.

## What isn't converted

Views, functions, procedures, triggers, synonyms, rules and security policies are written in T-SQL. They are listed in the report by name, never dropped silently, so you can rewrite them for MySQL.

## Questions about SQL Server to MySQL

### Is my dump uploaded?

No. The converter runs in your browser and reads the dump from your disk in pieces, so it never leaves your computer. The desktop app and the command line convert on your computer too.

### How large can the dump be?

The converter never holds the whole dump in memory: it reads the file twice, by ranges, and writes the script as it goes. Multi-gigabyte dumps convert in the browser, in the desktop app and with the command line.

### Does it read the UTF-16 file SSMS saves?

Yes. SSMS saves scripts as UTF-16 by default, and the converter reads UTF-16 and UTF-8 alike, gzipped or not, with GO between batches.

### Which SQL Server versions can the script come from?

Scripts that SSMS, dbatools or mssql-scripter write from SQL Server 2017 on. Every test script comes from SQL Server 2017, 2022 and 2025 and is compared with its source cell by cell.

### Are IDENTITY values kept?

Yes, for one column per table: the IDENTITY column that leads the primary key becomes AUTO_INCREMENT and continues after the highest id. Sequences aren't created, because MySQL has none, and the report says so.

### What happens to money, datetimeoffset and other SQL Server types?

bit becomes tinyint(1), money decimal(19,4), uniqueidentifier char(36), and datetimeoffset datetime in UTC. Schemas become table name prefixes in one database. Columns that ignored case compare exactly, and the report says which ones.

### What about procedures, triggers and views?

They are listed in the report by name and not converted, because each database writes them in its own language.

### Which MySQL versions does the script load on?

MySQL 5.7 and later. Every test script loads on 5.7 and 9, stopping at the first error if anything goes wrong.

## From SQL Server

- [SQL Server to PostgreSQL](https://intosql.com/sql-server-to-postgresql)
- [SQL Server to MariaDB](https://intosql.com/sql-server-to-mariadb)
- [SQL Server to SQLite](https://intosql.com/sql-server-to-sqlite)
- [SQL Server to SQL Server](https://intosql.com/sql-server-to-sql-server)
- [SQL Server to Oracle](https://intosql.com/sql-server-to-oracle)

## Into MySQL

- [MySQL to MySQL](https://intosql.com/mysql-to-mysql)
- [MariaDB to MySQL](https://intosql.com/mariadb-to-mysql)
- [PostgreSQL to MySQL](https://intosql.com/postgresql-to-mysql)
- [SQLite to MySQL](https://intosql.com/sqlite-to-mysql)
- [Oracle to MySQL](https://intosql.com/oracle-to-mysql)

## Guide and every pair

- [MySQL to SQL Server](https://intosql.com/mysql-to-sql-server)
- [SQL Server to MySQL migration guide](https://intosql.com/docs/migrations/sql-server-to-mysql)
- [SQL Server to MySQL data types](https://intosql.com/docs/types/sql-server-to-mysql)
- [Every database pair](https://intosql.com/database-migration)
