title: Connecting WAMP MySQL with VBA
body: <p>I am trying to connect WAMP MySQL with VBA. I have the tables created in the database using PHPMyAdmin. I have referenced Microsoft ActiveX Data Objects 2.8 Library and have installed MySQL Connector/ODBC 5.1 driver. I am not able to connect to mysql. My code is </p>
  
  <pre><code>Dim oConn As ADODB.Connection
  Private Sub ConnectDB()
      Set oConn = New ADODB.Connection
      oConn.Open "DRIVER={MySQL ODBC 5.1 Driver};" &amp; _
          "SERVER=127.0.0.1;" &amp; _ ' Tried localhost too
          "DATABASE= dbtest;" &amp; _
          "USER=root23;" &amp; _
          "PASSWORD=pass;" &amp; _
          "PORT=3306;"&amp; _
          "Option=3"
  End Sub
  </code></pre>
  
  <p>The error is </p>
  
  <p>Microsoft ODBC Driver Manager. Data Source name not found or no default driver specified. 
  All services in my WAMP are running. My <a href="http://localhost/phpmyadmin/" rel="nofollow">http://localhost/phpmyadmin/</a> page opens fine. I also tried putting PORT=3306 too.</p>