如何将 SQL Server 数据库迁移到 MySQL?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8019144/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 21:34:10  来源:igfitidea点击:

How to migrate SQL Server database to MySQL?

mysqlsql-serverdatabase-migration

提问by Mark Ma

I have a SQL Serverdatabase with lots of data and an empty MySQLdatabase. Now I want to copy all data of SQL Server database (including the database schema) to the MySQL database.

我有一个包含大量数据的SQL Server数据库和一个空的MySQL数据库。现在我想将 SQL Server 数据库的所有数据(包括数据库架构)复制到 MySQL 数据库中。

I thought about using raw SQL dump, but SQL Server's SQL syntax is not same as MySQL.

我想过使用原始 SQL 转储,但 SQL Server 的 SQL 语法与 MySQL 不同。

And I have googled some database migration tool, such as south(only for django), simple-db-migration(only for one type of database, maybe PostreSQL?) and SQLAlchemy(I haven't finished learning it, just feeling it somewhat clunky).

我在谷歌上搜索了一些数据库迁移工具,比如south(仅适用于django)、simple-db-migration(仅适用于一种类型的数据库,也许是PostreSQL?)和SQLAlchemy(我还没学完,只是感觉有点笨重)。

What tool can I use to do this migration?

我可以使用什么工具来执行此迁移?

回答by aleroot

I'm usually using opendbcopyfor these kind of jobs ...

我通常将opendbcopy用于此类工作......

回答by ScoRpion

This question has been asked several times on stackoverflow. you can check the following links

这个问题已经在 stackoverflow 上被问过几次了。您可以查看以下链接

How to export MS SQL database to MYSQL?

如何将 MS SQL 数据库导出到 MYSQL?

How to convert Mssql database to Mysql Database

如何将Mssql数据库转换为Mysql数据库

Please check these links I hope they will be useful to you..

请检查这些链接我希望它们对你有用..

回答by georgepsarakis

I tried this tool once http://dbconvert.com/convert-mssql-to-mysql-pro.php, but you have to pay for the full version. Of course you can write your own migration script e.g. in PHP. On Windows it will be easy to connect to MSSQL server, from a Linux machine you have to use ODBC and that is sometimes a bit messy to install and configure.

我曾经尝试过这个工具http://dbconvert.com/convert-mssql-to-mysql-pro.php,但你必须为完整版付费。当然,您可以编写自己的迁移脚本,例如在 PHP 中。在 Windows 上很容易连接到 MSSQL 服务器,在 Linux 机器上你必须使用 ODBC,有时安装和配置有点麻烦。