Reference article: http://www.cnblogs.com/24la/p/mysqldatadll.html
mono3.6.0+jexus5.6.1, operating system centOS6.5
Download install. NET MySQL connection component, get MySql.Data.dll my version is 6.7.4.0
Referencing in Web projects
To add a configuration in the Database Connection configuration section
<add name= "Mysqlconn" connectionstring= "server=192.168.79.135;database=monotest; Uid=root; pwd=123456; Charset=utf8 "providername=" MySql.Data.MySqlClient "/>
Note: My MySQL database character encoding is UTF8, here the connection string also specifies the character encoding to UTF8, lest Chinese characters garbled
Web. config adds configuration section when deploying to CentOS
<system.data>
<DbProviderFactories>
<add name= "MySQL Data Provider" invariant= "MySql.Data.MySqlClient"
Description= ". Net Framework Data Provider for MySQL"
Type= "Mysql.data.mysqlclient.mysqlclientfactory,mysql.data,
version=6.7.4.0, culture=neutral, publickeytoken=c5687fc88969c44d "/>
</DbProviderFactories>
</system.data>
Note that the MySql.Data.MySqlClient version changes according to its own situation
Page Chinese garbled processing, Web. config add a straight section
<globalization requestencoding= "gb2312" responseencoding= "gb2312" culture= "ZH-CN" uiculture= "ZH-CN"/>
The database establishes the test data table, carries on the test
Connect MySQL under Mono