Witam.
Próbuję połączyć się z bazą mysql host to cba.pl
Niby wszystkie dane dobrze wpisuję, ale ciągle mam błąd ""Unable to connect to any specified MySQL host"".
Prosty program do odczytywania:
string connString = "Server=mysql.cba.pl;Port=3306;Database=nazwastrony;Uid=root;password=testroot";
MySqlConnection conn = new MySqlConnection(connString);
MySqlCommand komando = conn.CreateCommand();
komando.CommandText = "Select text from Tabela1 where id=1";
try
{
conn.Open();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
MySqlDataReader reader = komando.ExecuteReader();
while(reader.Read())
{
Console.WriteLine(reader["text"].ToString());
}
Console.ReadLine();
Dodam że dll mysql pobrałem z nutget