如何将mysql数据库提取为.mdf [英] how to extract mysql database as .mdf

查看:357
本文介绍了如何将mysql数据库提取为.mdf的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我转到在 mysql 中创建的数据库时,我只看到 db.opt、.frm 和 .ibd 文件类型.有没有办法创建 .mdf 数据库文件,以便我可以在 Visual Studio 中进一步创建我的项目?

when I go to the database I created in mysql I just see a db.opt, .frm and .ibd file types. Is there a way to create a .mdf database file so I can further create my project in visual studio?

推荐答案

1) 您不想将 MySQL 数据库提取为 .mdf 文件".相反,您希望将 MySQL 数据库导出到 SQL 服务器数据库.

1) You do NOT want to "extract a MySQL database as an .mdf file". Instead, you want to export a MySQL database to a SQL server database.

2) SQL Server 使用以下任何文件 - 至少,您需要一个主数据库文件"和一个日志文件".但是您绝对需要 MSSQL 来为您管理这些文件:

2) SQL Server uses any of the following files - at a minimum, you need a "primary database file" and a "log file". But you absolutely need MSSQL to manage these files for you:

  • .mdf - 主数据库数据文件.
  • .ndf - 其他数据库数据文件,即非主数据文件.
  • .ldf - 日志数据文件.

3) 那么你如何导出?如果您熟悉 MSSQL SSMS(MSSQL GUI),您可能需要考虑使用导出/导入向导.这是使用 MSSQL导入"工具的一个很好的方法":

3) So how do you export? If you're familiar with MSSQL SSMS (the MSSQL GUI), you might want to consider using the Export/Import Wizard. Here is a good "howto" on using MSSQL "import" tools:

4) 或者,您也可以使用 phpAdmin 来导出"到 MSSQL:

4) Alternatively, you can also use phpAdmin to "export" into MSSQL:

5) 最后,如果您只想从 MSVS C# 或 ASP.Net 程序访问 mySQL 数据……实际上根本不需要导出/导入..Net 允许你直接访问 mySQL 数据:

5) Finally, if all you want to do is access mySQL data from an MSVS C# or ASP.Net program ... there's really no need to export/import at all. .Net allows you to access mySQL data directly:

祝你好运 - 让我们知道你发现什么最适合你!

Good luck - and let us know what you find works best for you!

这篇关于如何将mysql数据库提取为.mdf的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆