Convert SQL Server to MySQL Convert SQL Server to MySQL

Microsoft SQL Server Read a Microsoft SQL Server database, load it into MySQL

Move Your SQL Server Data to MySQL, Even From an Offline File

Univik reads your SQL Server (MSSQL) database straight from the file and exports the tables to CSV that MySQL loads directly. It works when the SQL Server is gone, the database is detached or the file is corrupt, so you can move to MySQL when a live connection is not an option.

  • No Live SQL Server: Read the MDF, NDF or BAK file directly, with no running instance.
  • Clean CSV Output: Every table exported for a MySQL LOAD DATA import.
  • Schema Reference: A SQL script that lists the columns and types to rebuild in MySQL.
  • Corrupt or Detached Source: Extract data that other tools cannot reach.

Univik SQL Server to MySQL box

SQL Server file to MySQL through CSV export Your source SQL Server file MDF, NDF or BAK Detached or offline Corrupt or a backup Univik exports CSV plus a schema script No SQL Server needed Your target MySQL MariaDB

 Why Univik

Move SQL Server Data to MySQL Without a Live Server

Most MSSQL to MySQL tools connect to a running database. Univik reads the file, so it works when the source is offline, detached or gone.

Reads the File, Not the Server

Opens the SQL Server file offline, so no running instance is needed. Convert when the old server is already gone.

CSV That MySQL Loads

Exports each table to CSV for LOAD DATA INFILE, MySQL Workbench or phpMyAdmin. CSV needs no dialect changes.

Schema You Can Rebuild

A SQL script lists every column and its type, so you create matching MySQL tables from a clear reference.

Handles the Whole Database

Reads the primary MDF plus every NDF file, so a multi file database converts in one pass with nothing left behind.

Works on Corrupt Sources

Reads at the page level, so a detached or damaged database still converts when a direct connection tool fails.

Read Only and Safe

The source is opened read only and never changed. There is no risk of data loss during the move.

 The Motivation

Why Convert SQL Server to MySQL

Teams move from SQL Server to MySQL to cut cost and gain flexibility. Here is what MySQL brings.

No License Fee

MySQL is free and open source, with no per core or per server license to buy.

No Vendor Lock In

The code is open, so you are free to move hosts or switch to a fork at any time.

Runs on Linux

MySQL runs on Linux, Windows and macOS, so you are not tied to Windows Server.

Cloud Friendly

Every major cloud offers managed MySQL, from small instances to large clusters.

Lower Running Cost

A smaller footprint and free tools cut the cost of running the database.

Large Community

A huge base of developers, hosts and tools backs MySQL.

 The Steps

How to Convert SQL Server to MySQL

Four steps from a SQL Server file to a loaded MySQL database.

The four steps of a SQL Server to MySQL conversion 1 Open the file MDF, NDF or BAK 2 Export to CSV plus a schema script 3 Create MySQL tables from the reference 4 Load the CSV LOAD DATA INFILE
  1. Open the SQL Server file: Select the MDF, NDF or BAK file in Univik. No SQL Server and no attach is needed.
  2. Export to CSV: Export the tables you want, each to its own CSV file, along with a SQL script that lists the columns and types.
  3. Create the MySQL tables: Use the SQL script as a reference to build matching tables in MySQL, mapping each SQL Server type with the guide below.
  4. Load the data: Import the CSV into MySQL with LOAD DATA INFILE, MySQL Workbench or phpMyAdmin, then verify the row counts match.

 Reference

SQL Server to MySQL Data Type Mapping

Use this guide when you create the MySQL tables. It covers the types you meet most often.

SQL ServerMySQL
intINT
bigintBIGINT
smallintSMALLINT
tinyintTINYINT UNSIGNED
bitTINYINT(1)
decimal / numericDECIMAL
moneyDECIMAL(19,4)
floatDOUBLE
realFLOAT
datetime / datetime2DATETIME
dateDATE
timeTIME
char / varcharCHAR / VARCHAR
nchar / nvarcharCHAR / VARCHAR with utf8mb4
text / ntextTEXT / LONGTEXT
varbinary / imageBLOB / LONGBLOB
uniqueidentifierCHAR(36)
xmlTEXT or JSON
What converts cleanly and what needs a rewrite From your SQL Server database Converts cleanly to MySQL Tables Columns and rows of data Primary and foreign keys Indexes and data types Needs a manual rewrite Stored procedures Views Triggers Other T-SQL logic

Beyond Data Types

A SQL Server IDENTITY column becomes AUTO_INCREMENT in MySQL, square brackets become backticks and TOP becomes LIMIT.

Tables, columns and data map cleanly with the guide above. Stored procedures, views and triggers are written in T-SQL, so they do not run on MySQL as is. Univik exports them in the SQL script as a reference, but you rewrite the logic for MySQL.

 Comparison

Univik vs Live Connection Tools

See how it compares to tools that pipe SQL Server to MySQL over a live connection.

Univik

  • Works Offline: Reads a detached, offline or corrupt file with no SQL Server running.
  • Clean CSV: Output that MySQL and MariaDB load directly.
  • Schema Reference: A SQL script that lists every column and type.
  • Whole Database: Reads the primary MDF plus every NDF file.
  • Read Only: The source is never touched.

Live Connection Tools

  • Server Required: The SQL Server must be running to read from it.
  • Fails When Gone: No connection means no migration.
  • Breaks on Corruption: A suspect database blocks the move.
  • Setup Heavy: Drivers and connection strings before you start.
  • Risk to Source: Reads run against the live database.

 Data Sheet

Converter Specifications

Product details, source support and requirements.

Product Name:Univik SQL Server to MySQL
Version:6.7 (Latest)
Source Files:SQL Server MDF (.mdf), NDF (.ndf) and BAK (.bak), detached, offline, corrupt or a backup.
Source Versions:SQL Server 2000 to 2025
Output:CSV for each table plus a SQL script that documents the schema.
Targets:MySQL and MariaDB, through CSV and LOAD DATA INFILE.
Platforms:Windows 11 and 10 (64-bit), Windows Server 2016 and later.
Prerequisites:.NET Framework 4.8 or higher. No SQL Server or SSMS needed.
License Price:Starting from $99   Buy Now

 Help & Support

SQL Server to MySQL Questions

Common questions about converting SQL Server to MySQL.

Univik exports your SQL Server data to CSV, which MySQL loads directly with LOAD DATA INFILE, MySQL Workbench or phpMyAdmin. It does not connect to a MySQL server itself, so you run the final import. This is why it works even when SQL Server is offline, which a direct connection tool cannot do.

Yes. Univik reads the SQL Server database file directly from disk, with no SQL Server, no ATTACH and no instance. Export the tables to CSV, then load them into MySQL on any machine.

The SQL script that Univik exports lists every column and its SQL Server type. Use it to create matching MySQL tables. Common mappings are int to INT, nvarchar to VARCHAR, datetime2 to DATETIME, bit to TINYINT and uniqueidentifier to CHAR(36). The full guide is in the data type mapping table above.

Yes. Univik reads the file at the page level, so it extracts data from detached, offline and corrupt databases that will not attach. For heavily damaged files, run Univik SQL Database Recovery first, then export to CSV.

Yes. MariaDB reads the same CSV files and uses the same LOAD DATA INFILE command, so the steps for MySQL apply to MariaDB without changes.

Source databases from SQL Server 2000 through 2025 are supported, including 2005, 2008, 2008 R2, 2012, 2014, 2016, 2017, 2019 and 2022. The version and collation are read from the file automatically.

No. The source file opens in read only mode and is never modified. All output goes to new CSV and script files you choose, so the conversion is safe to run on production data.

Table structures and data convert cleanly. Stored procedures, views and triggers are written in T-SQL, which MySQL does not run, so you rewrite them by hand. Univik exports them in the SQL script, so you have the original logic as a reference.

Still have questions? Contact support or Live Chat

 Related Tools

Explore More Univik Tools

SQL Server Database Migration

SQL Server Database Migration

The full migration guide, from server moves and upgrades to other database engines.

Learn More
SQL Database Converter

SQL Database Converter

Export a whole SQL Server database to CSV, Excel, SQL, JSON, XML, Parquet and Access.

Learn More
SQL Database Recovery

SQL Database Recovery

Repair a corrupt or suspect database before you export it to MySQL.

Learn More