1.安装环境:
1. vs2013 (vs开发工具)
2. mysql 5.7.10.0 (安装的mysql 数据库版本)
https://dev.mysql.com/doc/connector-net/en/connector-net-versions.html
http://dev.mysql.com/downloads/connector/net/
3. mysql-connector-net-6.9.9 (官网下载的驱动)
2.修改配置文件providers.congig
description="MySQL, MySQL provider 5.7.10.0"(安装mysql数据库的版本)
assemblyName="MySql.Data, Version=6.9.9.0,(驱动dll的版本)
<provider
name="MySql"
description="MySQL, MySQL provider 5.7.10.0"
enabled="true"
assemblyName="MySql.Data, Version=6.9.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" connectionClass="MySql.Data.MySqlClient.MySqlConnection"
commandClass="MySql.Data.MySqlClient.MySqlCommand"
parameterClass="MySql.Data.MySqlClient.MySqlParameter"
parameterDbTypeClass="MySql.Data.MySqlClient.MySqlDbType"
parameterDbTypeProperty="MySqlDbType"
dataAdapterClass="MySql.Data.MySqlClient.MySqlDataAdapter"
commandBuilderClass="MySql.Data.MySqlClient.MySqlCommandBuilder"
usePositionalParameters="false"
useParameterPrefixInSql="true"
useParameterPrefixInParameter="true"
parameterPrefix="?"
allowMARS="false"
/>
4. 配置文件sqlmap.config
<provider name="MySql"/>
<dataSource name="mybatisSource"
connectionString="Host=192.168.10.3;
UserName=root;
Password=geivepoww123456;
Database=updb;
Port=3306;" />
</database>
原文:http://www.cnblogs.com/dullbaby/p/6401746.html