title: C# wont open connection
body: <p>I have created a system that connects to the server to retrieve data from the Database, however I get "An unhandled exception of type 'System.TimeoutException' occurred in MySql.Data.dll"...</p>
  
  <p>Everything is fine if I connect to the localhost....</p>
  
  <pre><code>    string StrCon = string.Format("Server= Cant tell you ; database={0};UID= cant tell you ; password='cant tell you '", "cant tell you");
          MySqlConnection Connection = new MySqlConnection(StrCon);
  
          while (true)
          {
              //MySqlConnection Connection = null;
              Console.WriteLine("not connected");
              Connection.Open();
              Console.WriteLine("connected");
              string Query = "SELECT * FROM lat_long WHERE ID=1";
              MySqlCommand cmd = new MySqlCommand(Query, Connection);
              MySqlDataReader dr = cmd.ExecuteReader();
  </code></pre>