15

I would like to create a EF model using a MySQL database. I am running VS2012 and VS2013 on a 64 bit machine. What do I need to install to get MySQL to show up in the Entity Data Model Wizard when it's time to add a new connection ? I tried adding MySQL.Data.Entities Nuget package, but I still do not get the option in the wizard. When searching for MySQL .NET Connector, I only find 32 bit downloads. Please advise.

Thanks

enter image description here

UPDATE:

I ran the MySQL installer again and noticed the MySQL for Visual Studio was not installed. I ran it again and get an error. Here is the end of the install details:

1: File: license-zlib-net.html, Directory: C:\Program Files (x86)\MySQL\MySQL for Visual Studio 1.0.2\Documentation\Licenses for Third-Party Components\, Size: 17171 1: Action 6:09:56: ManagedDataInstall. Registering data provider in machine.config 1: Action 6:09:56: Rollback. Rolling back action: 1: Registering data provider in machine.config 1: Copying new files 1: Creating folders 1: Updating component registration 1: 1: MySQL for Visual Studio 1.0.2 2: {0D406BCC-D62A-46FB-9AB7-A7BF10FB8B31} 3: 3 1: 1: Final actions. 1: Install error

I can paste the entire contents of the details, but was hoping there is enough information. Does this offer any clues ? It almost looked like the install was having trouble modifying the machine.config files, but I changed the security on these files by adding "Everyone" to have read and write permission (temporarily).

Bill Greer
  • 3,046
  • 9
  • 49
  • 80

6 Answers6

16

For Visual Studio 2013 environment, download and install MySQL for Visual Studio 1.1.1 from the link below then you will be able to see MySQL Data Provider in Data Source list.

https://cdn.mysql.com/Downloads/MySQLInstaller/mysql-visualstudio-plugin-1.1.1.msi

Ergin
  • 306
  • 1
  • 5
  • 4
    Get the latest version (1.1.4 atow) from here: http://dev.mysql.com/downloads/windows/visualstudio/ – Florian F Apr 29 '14 at 13:12
  • 2
    to get the latest directly go to ftp://ftp.gwdg.de/pub/linux/mysql/Downloads/MySQL-for-VisualStudio/ – Bernhard Apr 30 '14 at 09:10
  • I downloaded and installed the latest version of MySQL for VS. But I still can't see MySQL data provider in data source list, I am using VS 2013 Express. With my VS 2010 Pro it works. I already restarted my PC. Any suggestions? Thanks! – jomsk1e Aug 19 '14 at 10:35
  • Additionally I installed MySQL for VS 1.2.3 – jomsk1e Aug 19 '14 at 10:47
  • The same problem, and solution, applies to Visual Studio 2015 and version 1.2.6. I downloaded the MySQL installer, upgraded Connector/NET from v6.9.8.0 to V6.9.9.0 and re-installed MySQL for VS 1.2.6. – Captain Kenpachi Aug 01 '16 at 09:35
2

Visual Studio 2013 Express cannot be used with MySQL for visual Studio according to the following article: http://dev.mysql.com/doc/connector-net/en/connector-net-visual-studio-install.html

In the Requirements section the above article mention that:

Requirements
MySQL Connector/Net supports full versions of Visual Studio 2008 and later, although the extent of support is based on your installed versions of MySQL Connector/Net and Visual Studio:

Visual Studio 2013 (***Professional edition and up only***) is supported by MySQL Connector/Net 6.8 and up with the MySQL for Visual Studio product.

Visual Studio 2012 is supported by MySQL Connector/Net 6.7 with MySQL for Visual Studio, and by MySQL Connector/Net 6.6 with the older Visual Studio Plugin.

Since you are using Express version, that may be the porblem.

Nidhin David
  • 2,426
  • 3
  • 31
  • 45
1

You need to download and install MySql Installer. The link is: http://dev.mysql.com/downloads/windows/installer/. For Visual Studio : http://www.mysql.com/why-mysql/windows/visualstudio/

ACS
  • 443
  • 4
  • 15
  • 1
    Hmmm. I installed and rebooted and I still do not get MySQL in my list of available Data Providers. Any suggestions ? – Bill Greer Dec 18 '13 at 18:54
1

Strange, I have it in my Visual Studio 2012. I installed mysql-installer-web-community-5.6.15.0.msi, and selected MySql for visual Studio!enter image description here

ACS
  • 443
  • 4
  • 15
  • 2
    the mysql installer has the adapter 1.0.2 which supports vs 2008,2010 & 2012. That's why you can see it, and he can't :) – Noctis Jan 25 '14 at 04:13
1

For you to see MySql provider you need both to install MySQL Connector/NET 6.7.x and MySQL for Visual Studio 1.0.2.

Or the latest versions MySql Connector/NET 6.8.3 and MySql for Visual Studio 1.1.3.

Bear in mind that if you install Connector/NET thru nuget, it will not register in the machine.config (so is more limited that way).

  • I had the same problem (MySQL Database not appearing on list of Data sources). Installing MySQL Connector Net 6.8.3, followed by a restart of Visual Studio made it appear. Although... a further problem was that I could only use EF 5.0 as I got a message saying "An Entity Framework database provider compatible with the latest version of Entity Framework could not be found on your data connection..." – NickBeaugié Jul 11 '14 at 16:35
  • Please follow this guide for EF6 (is fully supported with Cnet 6.8): http://dev.mysql.com/doc/connector-net/en/connector-net-entityframework60.html – Fernando Gonzalez Sanchez Jul 11 '14 at 16:56
0

If someone using Visual Studio 2013 and having the same issue when using mysql with entity framework.

Download MySQL for Visual Studio 1.2.7. and Connector/NET 6.7.5, 6.8.3 or 6.9.x.

Which will resolve your issue.

Make sure you have system.data and system.data.entity in your reference to the project.

Nikhil Dinesh
  • 3,359
  • 2
  • 38
  • 41