If you are receiving this error while using your MVC with MySQL database:
[ProviderIncompatibleException: The store provider factory type 'MySql.Data.MySqlClient.MySqlClientFactory' does not implement the IServiceProvider interface. Use a store provider that implements this interface.
You can follow this steps to fix the issue:
Add below into your web.config:
<system.data>
<DbProviderFactories>
<clear />
<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.0.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</DbProviderFactories>
</system.data>
Include the MySQL DLLs in your code. Please make sure the following files are in your BIN folder, not GAC:
* mysql.web.dll
* mysql.data.entity.dll
* mysql.data.dll
* mysql.data.cf.dll
Please make sure that DLL above is included. When you publish your website, Change that dll to "local copy" before you publish.
Make sure the DLL version that you're using in your web.config matches the actual version of your DLL. The version we provide in this KB article might not match what you are using.