使用vs2010连接mysql数据库

首先需要安装“.net支持”连接mysql的驱动,去http://www.mysql.com/downloads/connector/net/下载并安装。
然后就可以在vs2010的server explorer添加连接了。
在程序中你也可以用连接字符串,比如:
<add name="mySql"      connectionString="Server=localhost;Database=mydb;Uid=User;Pwd=mypass;"       providerName="MySql.Data.MySqlClient"/>

具体教程http://www.itcsolutions.eu/2010/09/09/how-to-connect-to-mysql-database-from-visual-studio-vs2010-problems-with-net-connectors/

posted @ 2013-03-25 20:45  RainOwl  阅读(316)  评论(0编辑  收藏  举报