将数据从 Microsoft SQL (.MDF) 文件导入 MySQL
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8377252/
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
Import data from Microsoft SQL (.MDF) file into MySQL
提问by blasteralfred Ψ
I am running PHP/5.3.0
with Apache/2.2.17 (Win32)
in my Windows Vista PC. I have MySQL server version: 5.5.8. I have a Database.MDF file containing some tables. I want to import this data into my MySQL database. I have Microsoft SQL Server installed. I use PHP MyAdmin. Anybody got a solution or a software package?
我正在PHP/5.3.0
用Apache/2.2.17 (Win32)
我的Windows Vista PC。我有 MySQL 服务器版本:5.5.8。我有一个包含一些表的 Database.MDF 文件。我想将此数据导入我的 MySQL 数据库。我安装了 Microsoft SQL Server。我使用 PHP MyAdmin。有人有解决方案或软件包吗?
回答by Cruachan
If you don't have MSSQL installed the simplest option would be to install SQL Server Express, attach your mdf, then export from there. You have quite a few options, from the simplest csv export/import, using a tool such as OpenDbCopy, or writing custom code to connect to both database and load from one to the other.
如果您没有安装 MSSQL,最简单的选择是安装SQL Server Express,附加您的 mdf,然后从那里导出。您有很多选择,从最简单的 csv 导出/导入,使用OpenDbCopy等工具,或者编写自定义代码以连接到两个数据库并从一个加载到另一个。
回答by greenLizard
Have you checked this out? Importing data to MySQL from MS SQL
你检查过这个吗? 将数据从 MS SQL 导入 MySQL
Or you can manually create the nysql tables, export the data from the MS into svg file and try importing it to mysql.
或者您可以手动创建 nysql 表,将数据从 MS 导出到 svg 文件中,然后尝试将其导入 mysql。