title: MySQL .Net connection pool connection.Open() very slow
body: <p>Version 6.4.4:</p>
  
  <p>Using the most basic implementation of MySqlConnection, the following code takes 2-5 seconds per connection when preloading the connection pool to reach the "Min Pool Size" configured in my connection string.</p>
  
  <p>Any ideas why it is taking so long, how to fix, or workarounds?</p>
  
  <p>Connection String:</p>
  
  <pre><code>&lt;add name="users" connectionString="server=192.168.1.2;User Id=dbuser;password=dbpassword;database=users;Pooling=true;Min Pool Size=10;Max Pool Size=50;Persist Security Info=True;" /&gt;
  </code></pre>
  
  <p>Code</p>
  
  <pre><code>private static void MySqlConnectionTester()
  {
      string connectionString = ConfigurationManager.ConnectionStrings["users"].ConnectionString;
  
      using (var connection = new MySqlConnection(connectionString))
      {
          using (var command = connection.CreateCommand())
          {
              command.CommandText = "select * from users;";
  
              try
              {
                  connection.Open(); // This line hangs until "Min Pool Size" is reached.
                  using (var reader = command.ExecuteReader())
                  {
                      while(reader.Read())
                      {
                          // Read results
                      }
                  }
              }
              catch(Exception ex)
              {
                  // Log exception
              }
              finally
              {
                  connection.Close();
              }
  
          }
      }
  }
  </code></pre>