使用microsoft EnterpriseLibrary(企业库)连接MySql数据库、Sql Server转MySql

使用前准备:

Enterprise Library:http://msdn.microsoft.com/zh-cn/library/cc467894(en-us).aspx
mysql-connector:http://dev.mysql.com/downloads/connector/net/5.2.html
MySQL:http://dev.mysql.com/downloads/mysql/

MySql安装:http://wenku.baidu.com/view/fe9b292e4b73f242336c5fe9.html

一、 使用microsoft EnterpriseLibrary(企业库)连接MySql数据库

参考:http://blog.csdn.net/redheart47/article/details/3532327

1.1只是MySql中sql语句里的中括号('[]')为默认关键字,所以都要去掉(原来SQL Server转为MySql才有此问题)
1.2数据库名不能包含小数点('.')
1.3数据库连接配置:
<add name="Connection String" connectionString="Data Source=localhost;database=VTS_NNU_Management_V30;User ID=root;Password=zyl" providerName="MySql.Data.MySqlClient" />
1.4引用驱动包中已经编译好的MySql类组件:MySql.Data.dll

二、Sql Server转MySql

转换工具:

http://blog.csdn.net/andrew_wx/article/details/6832404

MySQL导入和导出sql脚本

D:\Program Files\MySQL\MySQL Server 5.5\bin>mysqldump -h 192.168.103.55 -u root
-p -d --add-drop-table vts_nnu_match_v30 >d:/MysqlMatch.sql

http://blog.csdn.net/xiaoyu411502/article/details/5319232

 

 

posted on 2013-04-16 11:16  伊伦  阅读(2763)  评论(0编辑  收藏  举报

导航