29

I've been reading about mySQL DataSource and the ability to use mySQL with Entity Framework, but I can't really generate EF with mySQL without the use of the DataSource Dialog

enter image description here

How can I add mySQL Database to such dialog?

This is what I have done so far:

  • Installed mySQL Connector v.6.5.4
  • Restarted n-times my Windows 7 machine
  • Read all about how well mySQL Connector works on previous versions of Visual Studio
balexandre
  • 73,608
  • 45
  • 233
  • 342
  • I posted the solution here: http://stackoverflow.com/questions/17806294/mysql-connector-for-visual-studio-2012-update-3/19760429#19760429 – pafivi Nov 04 '13 at 01:43
  • 1
    @pafivi that is now as they have an installer, my question was asked back in October last year (2012) where no installer was available, database was still 5.3.x and connector version was 6.5.4, where's [today is 6.7.4](http://dev.mysql.com/downloads/connector/net/) but thanks for the comment. – balexandre Nov 04 '13 at 08:21
  • If you are trying to get VS2013 connected, check out my answer here: http://stackoverflow.com/a/20589057/1002222 – Gaʀʀʏ Dec 14 '13 at 22:46

7 Answers7

24

I have just read from mySQL Forums that mySQL will ship Visual Studio 2012 integration with mySQL Connector v.6.5.5

We'll be adding support for VS 2012 in Connector/NET 6.5.5 and later 6.6.x version http://forums.mysql.com/read.php?38,546265,564533#msg-564533

and give a link to test a trick

http://social.technet.microsoft.com/wiki/pt-br/contents/articles/10476.instalando-mysql-connector-no-visual-studio-2011-beta.aspx

and here is the vsix file if you follow the tutorial (In Portuguese)

Microsoft Visual Studio Extension for mySQL: http://cl.ly/JqXO

just download and double click...

then, you will get all to work

enter image description here

Using Visual Studio 2012 Professional

enter image description here

balexandre
  • 73,608
  • 45
  • 233
  • 342
  • 2
    balexandre your extention doesn't seem to work anylonger. Maybe it's the VS2012 Update 3 that just came out or the new 6.7.4 MySQL .NET connector that just released. After reinstalling your extention MySQL appears in the datasource list and I can test my credentials but when I click "OK" Visual Studio throws an error and doesn't let me add the connection. – Jeremy Sheldon Jul 08 '13 at 16:18
  • 1
    I am having the exact issue described by Jeremy Sheldon. The same behavior occurs whether I use the vsix linked above (seems to be for an older version than the latest), and when I use the MySQL web installer to get the Visual Studio MySQL Connector/NET 1.0.2. Not only does clicking OK throw the "unable to find requested .NET Framework Data Provider," but entering any text in the form for Server Name, User Name, or Password results in the form being immediately closed. This is described (http://dev.mysql.com/doc/relnotes/connector-net/en/connector-net-news-6-7.html) as being fixed, but... – user483679 Aug 08 '13 at 17:41
  • Hello balexandre do you have this kind of file for latest version of mySql 6.7.4.0 ? – Arbejdsglæde Oct 24 '13 at 09:39
  • for `6.7.x+` mySql installs it along the full product: http://dev.mysql.com/tech-resources/articles/mysql-installer-for-windows.html it includes "MySQL for Visual Studio" – balexandre Oct 24 '13 at 11:56
  • 2
    Please use the official extension, http://dev.mysql.com/downloads/windows/visualstudio/ (which supports VS2008 / VS2010 / VS2012 / VS2013) – Fernando Gonzalez Sanchez Jul 15 '14 at 01:50
7

One clarification: Visual Studio Express DOES NOT support MySQL .NET Connector as extension.

You still may use it adding reference to MySql.Data.dll file that you may find in MySQL Connector installation folder (for me it was W:\Program Files\MySQL\Connector NET 6.5.4\Assemblies\v4.0). After that you may use it like this:

using MySql.Data.MySqlClient;
...
var mycon = new MySqlConnection();
SwiftHanded
  • 71
  • 1
  • 3
  • the idea is to be able to use mySQL in the Server Explorer, for that, you need the extension I mention on my answer! – balexandre Jan 27 '13 at 23:17
5

According to this page: http://dev.mysql.com/downloads/connector/net/

"Starting with version 6.7, Connector/Net will no longer include the MySQL for Visual Studio integration. That functionality is now available in a separate product called MySQL for Visual Studio available using the MySQL Installer for Windows (see http://dev.mysql.com/tech-resources/articles/mysql-installer-for-windows.html)."

David Broadfoot
  • 300
  • 3
  • 9
  • true, just installed yesterday on a brand new machine with windows 8 :) – balexandre Aug 27 '13 at 07:08
  • almost knocked my head off trying to figure how come v6.7 does not appear on Visual Studio Data Source list. ended up installing the whole package (mysql-installer-community-5.6.13.1.msi - 192MB !) – itsho Aug 28 '13 at 20:11
3

Visual Studio 2012 is not yet supported by MySQL Connector v.6.5.4. You can't add a connection to MySQL in the Server Explorer to begin with.

According on this post, support will be added on MySQL Connector v.6.5.5

John Woo
  • 258,903
  • 69
  • 498
  • 492
1

Connector/NET 6.5.5 does not support VS2012, but Connector/NEt 6.6.x does.

However Visual Studio Express editions are not supported, hence the only way to work in Entity Framework and Visual Studio Express and MySql (or other database different than SQL Server for that matter) is using code first.

  • Remember that you are duplicating an answer (my own), as I do state that since 6.5.5 it will be supported. But the question was made in **October 2012**, where the last version was only **2.5.4** (without native support for VS) – balexandre Apr 24 '13 at 04:45
  • Not exactly, the post http://forums.mysql.com/read.php?38,546265,564533#msg-564533 is wrong, VS2012 is not supported in 6.5.x (any 6.5) but is supported in 6.6. – Fernando Gonzalez Sanchez Apr 30 '13 at 22:17
  • It's not supported out of the box, but if you download, install and run the extension I provided in my answer, work's as a charm! – balexandre Apr 30 '13 at 22:54
1

It wouldn't matter if you had the MySQL driver showing as far as I can tell. I'm running VS 2012.3 and if I try to create a Data Connection in VS Server Browser, I can get as far as selecting the MySQL driver and no more. If I try typing a servername/username/password (any of the fields), the window just disappears and YES, it's only when the MySQL driver is being used so NO it's not vs (not exclusively) causing the problem. Go ahead and say that it's my environment but you'd not be able to justify that even remotely compared to the FACT of what is happening. ALL my other software/extentions/add-in/libraries work just fine. No surprise either seeing how buggy the "3 minute" Windows Installer was. Had to uninstall/reinstall a server instance to get to the configuration wizard and there is no other apparent way to configure an instance without it. I'd rather have the old setup. /rant

rainabba
  • 3,804
  • 35
  • 35
0

Downloaded and install Download MySQL for Visual Studio http://dev.mysql.com/downloads/windows/visualstudio/1.1.html

dellyjm
  • 426
  • 1
  • 5
  • 10