Answer the question
In order to leave comments, you need to log in
How to connect to a remote MySQL database using EF6?
What you need to register in the config, what to connect to the database.
<connectionStrings>
<add name="DataContext"
connectionString="metadata=res://*/Data.Entity.Model.csdl|res://*/Data.Entity.Model.ssdl|res://*/Data.Entity.Model.msl;provider=MySql.Data.MySqlClient;provider connection string="Data Source=mysql46.1gb.ru;User Id=login;Password=pass ;Initial Catalog=databasename;""
providerName="System.Data.EntityClient"/>
</connectionStrings>
<entityFramework codeConfigurationType="MySql.Data.Entity.MySqlEFConfiguration, MySql.Data.Entity.EF6">
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework"/>
<providers>
<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6"/>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/>
</providers>
</entityFramework>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question