0

Installed via NuGet: MySql.Data, MySql.Data.Entities, MySql.Data.Entity.

Web.config:

<connectionStrings>
  <add name="WhateverEntities" providerName="MySql.Data.MySqlClient" connectionString="server=127.0.0.1;port=3306;database=dbname;uid=root;password=pass" />
<connectionStrings>

...

<entityFramework>
  <defaultConnectionFactory type="MySql.Data.Entity.MySqlConnectionFactory, MySql.Data.Entity.EF6" />
    <providers>
      <provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=6.9.6.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
    </providers>
<entityFramework>

ApplicationDbContext.cs:

public ApplicationDbContext() : base(nameOrConnectionString: "WhateverEntities") {}

tried to add:

[DbConfigurationType(typeof(MySql.Data.Entity.MySqlEFConfiguration))]

and:

[DbConfigurationType(typeof(MySqlEFConfiguration))]

got this error:

An exception of type 'System.Data.Entity.Core.ProviderIncompatibleException' occurred in EntityFramework.dll but was not handled in user code

Additional information: The provider did not return a ProviderManifestToken string.

What's wrong?

7
  • possible duplicate of EF 4.1 exception "The provider did not return a ProviderManifestToken string" Commented Apr 23, 2015 at 19:21
  • @vdwijngaert: I checked that before and changed my password in config.inc.php (Xampp) with no success. Commented Apr 23, 2015 at 19:31
  • What does PHP and Apache have to do with this? You're running a windows server. Commented Apr 23, 2015 at 19:34
  • I'm trying to connect to a MySql database on localhost powered by Xampp. Commented Apr 23, 2015 at 19:51
  • Config.inc.php is probably your phpmyadmin configuration file. You can't change your mysql password in there. Verify your username and password using the commandline application, or using phpmyadmin. Commented Apr 23, 2015 at 19:53

1 Answer 1

1

It was a matter of password as vdwijngaert suggested. Changed it in PhpMyAdmin.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.