title: How can I fix this MySql Exception? [c#]
body: <p>So I tried to create a simple login form wich uses a MySql database.
  I made a simple MySql database at hostinger and a table named users with two columns a username column and a password column. Then I coded this:</p>
  
  <pre><code>namespace MySql_Login_Form
  {
      public partial class Form1 : Form
      {
          public Form1()
          {
              InitializeComponent();
          }
  
          private void loginBtn_Click(object sender, EventArgs e)
          {
              try {
                  MySqlConnection connection = new MySqlConnection("Server=mysql.hostinger.nl;Database=u725015652_users;User Id=u725015652_gewoo;Password=[MyPassword];");
                  MySqlDataAdapter adapter;
                  DataTable table = new DataTable();
                  adapter = new MySqlDataAdapter("SELECT `username`, `password` FROM `users` WHERE `username` = '" + usernameTxt.Text + "' AND `password` = '" + passwordTxt.Text + "'", connection);
                  adapter.Fill(table);
  
                  if (table.Rows.Count &gt;= 1)
                  {
                      MessageBox.Show("Succeed");
                  }
                  else
                  {
                      MessageBox.Show("False");
                  }
              }
              catch (Exception ex)
              {
                  MessageBox.Show(ex.ToString());
              }
          }
      }
  }
  </code></pre>
  
  <p>My database details:
  <a href="https://i.stack.imgur.com/sY6FP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sY6FP.png" alt="enter image description here"></a></p>
  
  <p>When I run the code I get this error:</p>
  
  <pre><code>MySql.Data.MySqlClient.MySqlException (0x80004005): Unable to connect to any of the specified MySQL hosts. ---&gt; System.Net.Sockets.SocketException (0x80004005): Host is unknown
     at System.Net.Dns.GetAddrInfo(String name)
     at System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6)
     at System.Net.Dns.GetHostEntry(String hostNameOrAddress)
     at MySql.Data.Common.MyNetworkStream.CreateStream(MySqlConnectionStringBuilder settings, Boolean unix)
     at MySql.Data.Common.StreamCreator.GetStream(MySqlConnectionStringBuilder settings)
     at MySql.Data.MySqlClient.NativeDriver.Open()
     at MySql.Data.MySqlClient.NativeDriver.Open()
     at MySql.Data.MySqlClient.Driver.Open()
     at MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings)
     at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection()
     at MySql.Data.MySqlClient.MySqlPool.TryToGetDriver()
     at MySql.Data.MySqlClient.MySqlPool.GetConnection()
     at MySql.Data.MySqlClient.MySqlConnection.Open()
     at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
     at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
     at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
     at MySql_Login_Form.Form1.loginBtn_Click(Object sender, EventArgs e) in C:\.....\Login Form\MySql Login Form\Form1.cs:Line 28
  </code></pre>
  
  <p>Line 28 is this line:</p>
  
  <pre><code>adapter.Fill(table);
  </code></pre>