How to extract mysql database as .mdf

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

0


source to share


2 answers


To use MySQL database in Visual Studio, you need to use Connector / Net and MySQL for Visual Studio. This code works well and will allow you to use MySQL with various VS features.

Or you need to migrate data from MySQL to SQL Server. There are tools for this if you must.

See here. http://dev.mysql.com/tech-resources/articles/mysql-installer-for-windows.html



True, some MySQL databases have on-disk structures that use .frm and .ibd files. But these files are designed to access pretty much exclusively the MySQL server process.

It is also true that the mdf file is an ondisk structure for SQL Server. These files are not migrated like .xls files or other "document" files.

0


source


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

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

  • .mdf - Primary database data file.
  • .ndf - Other database data files, i.e. not primary.
  • .ldf - log data file.

3) So how do you export? If you are familiar with MSSQL SSMS (MSSQL GUI), you might consider using the Export / Import Wizard. Here's a good howto when using the MSSQL import tools:



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

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

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

0


source







All Articles