hy!
I just created a little MYSQL remote c# tool.
The Problem is, that i get the error :Unable to connect to any of the specified MySQL hosts
CODE:
string myConnectionString = "SERVER=http://xxx;PORT=3306;" +
"DATABASE=xxx;" +
"UID=root;" +
"PASSWORD=xxx;";
MySqlConnection connection = new MySqlConnection(myConnectionString);
MySqlCommand command = connection.CreateCommand();
command.CommandText = "SELECT * FROM USER";
MySqlDataReader Reader;
connection.Open();//Here ocurres the error
Reader = command.ExecuteReader();
string tmp ="";
while (Reader.Read())
{
string row = "";
for (int i = 0; i < Reader.FieldCount; i++)
row += Reader.GetValue(i).ToString() + ", ";
tmp += row + "\n";
}
MessageBox.Show(tmp);
connection.Close();
When i use MYSQL Workbench from remote i can normaly login
Please help
SERVER=http://xxxthe pre-pend ofhttp://is not required for database connection in this case.