title: SocketException was unhandled when connecting to a database
body: <pre><code>using System;
  using MySql.Data.MySqlClient;
  namespace test2 {
      class Program {
          static void Main(string[] args) {
              string connectionString =  "Server=localhost;Database=login;Uid=root;Pwd=TheDarkest;";
              MySqlConnection connection = new MySqlConnection(connectionString);
              connection.Open();
          }
      }
  }
  </code></pre>
  
  <h1><a href="https://i.stack.imgur.com/4R5uA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4R5uA.png" alt="enter image description here"></a></h1>
  
  <p>The exception occurs at <code>connection.Open()</code>. I cannot seems to find the solution though I looked everywhere.</p>
  
  <p>Btw I can connect to the database using python.</p>