How to connect to a MySQL Data Source in Visual Studio

JohnB picture JohnB · Nov 20, 2010 · Viewed 188.3k times · Source

I use the MySQL Connector/Net to connect to my database by referencing the assembly (MySql.Data.dll) and passing in a connection string to MySqlConnection. I like that because I don't have to install anything.

Is there some way to "Choose Data Source" in Visual Studio 2010 without installing something?

How can I get a MySQL option (localhost) to show up on one of these lists? Or do I have to install something?

(I don't want to use ODBC btw)

"Add Connection" from Server Explorer: alt text

Entity Data Model Wizard: alt text

Answer

Jon Black picture Jon Black · Nov 21, 2010

install the MySQL .NET Connector found here http://dev.mysql.com/downloads/connector/net/

alt text