title: Cannot connect to MySQL database in C#.NET
body: <p>So I'm following this tutorial: <a href="http://support.microsoft.com/kb/314145/" rel="nofollow">http://support.microsoft.com/kb/314145/</a></p>
  
  <p>and I get an unexpected error: <strong>A first chance exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll</strong></p>
  
  <p>My class looks like this:</p>
  
  <pre><code>    class Database
  {
      public Database()
      {
          string connectionString = "Password=pass;User ID=userid;Initial Catalog=soksko;Data Source=(local)";
          using (SqlConnection connection = new SqlConnection(connectionString))
          {
              connection.Open();
              Console.WriteLine("ServerVersion: {0}", connection.ServerVersion);
              Console.WriteLine("State: {0}", connection.State);
          }
  
          Console.WriteLine("Database: OK");
      }
  
  }
  </code></pre>
  
  <p>I googled, but I couldnt find anything valuable. I am using MySQL database, it is on the same computer and I am using VS 2013. I successfully added my database to Server Explorer with the same connection information that I use above, but I get exception, when I try to open the connection.</p>