可以的,这是连接字符串:
 ODBC 
 Local database:
"Driver={mySQL};Server=mySrvName;Option=16834;Database=mydatabase;" 
 Remote database:
"Driver={mySQL};Server=data.domain.com;Port=3306;Option=131072;Stmt=;Database=my-database;Uid=username;Pwd=password;" 
 OLEDB, OleDbConnection (.NET) 
 Standard:
"Provider=MySQLProv;Data Source=mydb;User Id=UserName;Password=asdasd;" 
 MySqlConnection (.NET) 
 EID:
"Data Source=server;Database=mydb;User ID=username;Password=pwd;Command Logging=false" 
This one is used with eInfoDesigns dbProvider, an add-on to .NET
 Declare the MySqlConnection:C#:
using EID.MySqlClient;
MySqlConnection oMySqlConn = new MySqlConnection();
oMySqlConn.ConnectionString = "my connectionstring";
oMySqlConn.Open(); VB.NET:
Imports EID.MySqlClient
Dim oMySqlConn As MySqlConnection = New MySqlConnection()
oMySqlConn.ConnectionString = "my connectionstring"
oMySqlConn.Open()

解决方案 »

  1.   

    可以,用OLEDB类就可以实现
      

  2.   

    using System.Data.SqlClient;
    DataSet ds=new DataSet("XMLProducts");
    //连接SQL Server数据库
    SqlConnection conn=new SqlConnection(@"server=glf;uid=sa;pwd=;database=northwind");
    SqlDataAdapter da=new SqlDataAdapter("SELECT * FROM products",conn);
    //绑定DataGrid控件
    da.Fill(ds,"products");
      

  3.   

    1、在主机上安装ODBC驱动之后才可以使用
    string MyConString = "DRIVER={MySQL ODBC 3.51 Driver};" + "SERVER=localhost;" +
                             "DATABASE=test;" +"UID=venu;" +"PASSWORD=venu;" +"OPTION=3";    OdbcConnection MyConnection = new OdbcConnection(MyConString);
        MyConnection.Open();
      

  4.   

    5drush的文章
    http://www.microsoft.com/china/community/Column/63.mspx
      

  5.   

    http://dev.csdn.net/article/16/16437.shtm
    http://www.connectionstrings.com/