EF Code First Error MySQL

0

I'm doing codefirst using mysql.

When I run the update-database the following problem occurs:

Target database is: 'DBContext' (DataSource:. \ SQLEXPRESS, Provider: System.Data.SqlClient, Origin: Convention). System.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server / Instance Specified)

I have tried to configure the app.config, but it does not work, as follows:

  

<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />

       

  <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=6.10.8.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d">
  </provider></providers>

                                               

    
asked by anonymous 30.09.2018 / 02:41

0 answers