Deploy website with MySql connector for .NET

First you need to install .net connector for MySql. If you navigate to installation directory you will find under Assemblies folder either v2.0 or v4.0 folders, assemblies that need to be added as references to your project.

Choose those from v4.0 and import them into you project. Should be those below:


When you deploy your website because .net connector is not installed on the server you need to modify your web.config to contain the following lines:

  <>    <DbProviderFactories>      <clear/>      <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=, Culture=neutral, PublicKeyToken=c5687fc88969c44d"
/> </DbProviderFactories> </>

.csharpcode, .csharpcode pre{ font-size: small; color: black; font-family: consolas, “Courier New”, courier, monospace; background-color: #ffffff; /*white-space: pre;*/}.csharpcode pre { margin: 0em; }.csharpcode .rem { color: #008000; }.csharpcode .kwrd { color: #0000ff; }.csharpcode .str { color: #006080; }.csharpcode .op { color: #0000c0; }.csharpcode .preproc { color: #cc6633; }.csharpcode .asp { background-color: #ffff00; }.csharpcode .html { color: #800000; }.csharpcode .attr { color: #ff0000; }.csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em;}.csharpcode .lnum { color: #606060; }