如何获取c#.net中的mysql服务器列表

时间:2015-01-06 10:40:05

标签: c# mysql

我需要mysql服务器列表。我使用以下命令获取mssql服务器列表。

DataTable dtServers = Microsoft.SqlServer.Management.Smo.SmoApplication.EnumAvailableSqlServers();
  int AllServerCount = dtServers.Rows.Count;

   // If there are any servers at all
  if (dtServers.Rows.Count > 0){

   // Loop through each server in the DataTable
    foreach (DataRow drServer in dtServers.Rows){

      cmbServer.Items.Add(drServer["Name"]); 
    }
     // Add the name to the combobox
  }

c#中的任何等效mysql代码是否会填充所有mysql服务器?

0 个答案:

没有答案