MySQL error version 7.0.6-IR3 when trying to connect to db

When trying to connect to MySQL db, I got the error below.

Inheritance security rules violated by type: 'MySql.Data.MySqlClient.MySqlProviderServices'. Derived types must either correspond to the security of the underlying type or are less accessible.

The following is the entityframework configuration:

<entityFramework codeConfigurationType="MySql.Data.Entity.MySqlEFConfiguration, MySql.Data.Entity.EF6"> <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" /> <providers> <provider invariantName="Oracle.ManagedDataAccess.Client" type="Oracle.ManagedDataAccess.EntityFramework.EFOracleProviderServices, Oracle.ManagedDataAccess.EntityFramework, Version=6.121.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342" /> <provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=7.0.6.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"></provider> </providers> </entityFramework> 

Before that I use MySQL 6.9.9 and no errors occur. Please, help.

+5
source share
1 answer

This is a known bug in the MySql connector, tracked here: https://bugs.mysql.com/bug.php?id=89134

The workaround is to switch to a lower version connector (for example, the one you used)

+1
source

Source: https://habr.com/ru/post/1262196/


All Articles