If you receive the following error when 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
You can follow the instruction below to resolve this issue:
1. Add the following into your Web.config:
"MySQL Data Provider"
".Net Framework Data Provider for MySQL"
"MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=22.214.171.124, Culture=neutral, PublicKeyToken=c5687fc88969c44d"
2. Include the following MySQL DLLs in your code. Please make sure the following files is in your BIN folder, not GAC.
3. When you publish your webisite , please make sure those dll above are included. Change those dll to "local copy" before you publish.
4. Make sure the dll version that you're using in your web.config matches the actual version of your DLL. The version we povide in this KB article might not match what you are using.