MySQL ADO connector:
http://dev.mysql.com/downloads/connector/net/
Select version:
Generally Available releases (1) is the release version (bug what the less version of it), and development releases (2) is the development version
We use version 1
Windows (x86, 32-bit), MSI Installer
This version is the installation version under Window, if you install this version, in the native debugging can not be re-registered Mysql.data.mysqlclient,vs will find dbprovider for this DLL,
If duplicate registration will error
Error creating System.Data configuration section Handler: Column "InvariantName" is constrained to be unique. The value "MySql.Data.MySqlClient" already exists.
Such as:
. Net & Mono (Architecture Independent), ZIP Archive
If this is the version, then you need to manually register the DLL, or debug or deploy to the Linux server when the MySql.Data.dll is unable to be loaded, so to manually register the code below
<System.Data> <dbproviderfactories> <Addname= "MySQL Data Provider"invariant= "MySql.Data.MySqlClient"Description= ". Net Framework Data Provider for MySQL"type= "mysql.data.mysqlclient.mysqlclientfactory,mysql.data,version=6.9.0.0, culture=neutral, PublicKeyToken= C5687fc88969c44d "/> </dbproviderfactories> </System.Data>
For
Type= "mysql.data.mysqlclient.mysqlclientfactory,mysql.data,version=6.9.0.0, Culture=neutral, PublicKeyToken= C5687fc88969c44d "
This paragraph changes according to its own version: C:\Windows\Assembly
Note: This will be the wrong time to repeat the registration when debugging under Windows.
I tangled up: After the group of friends stay up, such as head of the help to solve the
Prior to registration, the configuration of the above Web. config changes to
<System.Data> <dbproviderfactories> <Removeinvariant= "MySql.Data.MySqlClient"></Remove>//Remove First, then register <Addname= "MySQL Data Provider"invariant= "MySql.Data.MySqlClient"Description= ". Net Framework Data Provider for MySQL"type= "mysql.data.mysqlclient.mysqlclientfactory,mysql.data,version=6.9.0.0, culture=neutral, PublicKeyToken= C5687fc88969c44d "/> </dbproviderfactories> </System.Data>
OK, solved, thanks for staying up after the help of such as Avatar. I also record this issue to help friends who encounter this problem later.