1

Had been struggling this for quite sometime. Installed MySQL DB, MySQL .Net Connector and everything that came with MySQL installation. Created a project in VS. Installed MySql.Data and MySql.Entity from Nuget. Tried to create EDMS using ADO model. On the connection popup, no entry for MySql server and no MySql .Net connector in the dropdown.

enter image description here

In web.cofing:

<connectionStrings>
    <add name="LocalMySqlServer" connectionString="server=localhost;user id=root;password=mypassword;database=mydb" providerName="MySql.Data.MySqlClient" />
 </connectionStrings>

Connectionfactory and other entries in web.config are fine too.

<dependentAssembly>
        <assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-6.9.9.0" newVersion="6.9.9.0" />
      </dependentAssembly>

<entityFramework>
    <defaultConnectionFactory type="MySql.Data.Entity.MySqlConnectionFactory, MySql.Data.Entity.EF6">
      <parameters>
        <parameter value="mssqllocaldb" />
      </parameters>
    </defaultConnectionFactory>
    <providers>

    <provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=6.9.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"></provider></providers>
  </entityFramework>
  <system.data>
    <DbProviderFactories>

    <remove invariant="MySql.Data.MySqlClient" /><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.9.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" /></DbProviderFactories>
  </system.data>

Have repeated instructions provided here Cannot connect to mysql from visual studio 2015 and here Can't Create Entity Data Model - using MySql and EF6 many times but no success. DLLs are referenced correctly.

Any pointers? Is there a log file somewhere that can tell me why MySql connector is not working?

Community
  • 1
  • 1
Allen King
  • 2,372
  • 4
  • 34
  • 52

0 Answers0