title: My Sql Connection error Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
body: <p>I am trying to connect to MySql database with c#. But i am getting this error.</p>
  
  <pre><code>   Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified.
  </code></pre>
  
  <p>My c# code</p>
  
  <pre><code> Connection con = new Connection();
          Recordset rs = new Recordset();
          string conStr = ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString();
          con.Open(conStr);  // Here its throwing the error
  </code></pre>
  
  <p>Connection string:</p>
  
  <pre><code>&lt;add name="DefaultConnection" 
           connectionString="DRIVER={MySQL ODBC 5.2w Driver};Server=localhost;Database=laundrydatabase;Uid=root;Pwd=123"
           /&gt;
  </code></pre>
  
  <p>I am using </p>
  
  <pre><code>mysql-connector-net-6.6.5
  MySQL ODBC 5.1 Driver}
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/HaHUD.png" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/9xQm9.png" alt="enter image description here"></p>