Arbejdsglæde
Arbejdsglæde

Reputation: 14088

How to connect to a MySQL Data Source in Visual Studio 2012/2013 express on x64 bit machine

I have installed the Connector/Net for MySQL, but I still don't see them in Server explorer.

What should I do for see it ?

I can find files on my disk and etc. I also tried manually add description to machine.config for all framework versions

<system.data>
    <DbProviderFactories>
      <add name="Microsoft SQL Server Compact Data Provider 4.0" invariant="System.Data.SqlServerCe.4.0" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
      <add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.7.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
    </DbProviderFactories>
  </system.data>
  <system.serviceModel>

but this is does't work.

No mySql Connector here

Upvotes: 5

Views: 10640

Answers (4)

Sulyman
Sulyman

Reputation: 460

after Alot of searching and trying many solutions I got it finally:

1-uninstall connector

2-uninstall mysql for visual studio from control panel

enter image description here

3-reinstall them depending on the table below enter image description here 4-copy the assemply files from C:\Program Files (x86)\MySQL\MySQL Connector Net 6.9.8\Assemblies\v4.5 <> to C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE 5-logoff and reopen your solution

6-enjoy

Upvotes: 0

Ahmad Tijani
Ahmad Tijani

Reputation: 412

There is a mysql visual studio plugin i got from mysql website.

Once I installed it, it appeared in server explorer.

I am also using a 64 bit machine.

Upvotes: 1

Musa Haidari
Musa Haidari

Reputation: 2267

My Soulution worked on VS 2013 Express.

For MySQL you do not need to use a Data Source. Please follow this procedure:

  • Install MySQL Connector/Net
  • Open your project
  • Go to Project > Add reference, Reference Manager window opens
  • Select Assembly > Extensions > MySql.Data.CF and press OK.
  • Use using MySql.Data.MySqlClient;

And your code works fine.

Upvotes: 3

NoWar
NoWar

Reputation: 37632

I did some investigation and I installed this

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

based on

http://forums.mysql.com/read.php?174,601041,601041#msg-601041

And it is appearing well!!! Hahahahaa!

Upvotes: 1

Related Questions