title: MySqlException: Timeout expired - Increasing Connection Timeout Has Had No Effect
body: <p>I have a query that is taking longer to execute as the database increases in size. The query is optimized and necessary, but my C# Console Application has recently been giving me this error:</p>
  
  <pre><code>Unhandled Exception: MySql.Data.MySqlClient.MySqlException: Timeout expired.
  </code></pre>
  
  <p>Increasing the connection time out in the connection string doesn't help; I increased it from</p>
  
  <blockquote>
    <p>Connect Timeout=28800</p>
  </blockquote>
  
  <p>to </p>
  
  <blockquote>
    <p>Connect Timeout=128800</p>
  </blockquote>
  
  <p>but I'm still getting the error despite this change.</p>
  
  <p>If I run the query from MySQL workbench it only take about 10 seconds, so I'm not sure how to prevent this Unhandled Exception.</p>
  
  <p>Are there other things, besides "the time a query takes", that can produce this exception?</p>