Recently, I've been experiencing the same issues as you. In SQL Server, everything operated without a hitch, but after switching to MySQL, I ran into several issues. Some things that worked for me are:
Install-Package MySQL.Data -Version 6.9.9 Install-Package MySql.Data.Entity -Version 6.9.10
There seem to be issues with the more recent MySQL 8.0 packages. It worked when I went back to an earlier version.
Your app.config should seem as follows:
<dependentAssembly> <assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-184.108.40.206" newVersion="220.127.116.11" /> </dependentAssembly> </assemblyBinding> </runtime> <entityFramework> <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" /> <providers> <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" /> <provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=18.104.22.168, 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=22.214.171.124, Culture=neutral, PublicKeyToken=c5687fc88969c44d" /> <add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=126.96.36.199, Culture=neutral, PublicKeyToken=c5687fc88969c44d" /> </DbProviderFactories> </system.data> </configuration>
Even after that, I'm just now becoming aware of a few differences in MySQL. For example, your migration "index" statements will not work. The migration file must be modified, and the index must be created manually. Another thing that I just read, but haven't encountered, is that the MySQL driver does not allow multiple connections which may mean changing the way you retrieve async collections. The last issue I encountered was with RowVersion being a byte[. To resolve this, I used a version from the following article (let's hope!).