No announcement yet.

Connecting to localhost MySQL Database

  • Filter
  • Time
  • Show
Clear All
new posts

  • Connecting to localhost MySQL Database

    Ok .... Just recently installed the latest MySQL. Downloaded the drivers for it as well .... and as I'm practicing in the MySQL workbench I'm again going to use excel and web pages to insert information into the database.

    My first foray will be using excel as I have some experience with Msft SQL server and Access and PostGre databases. Trying to remember everything I did or had to do. But I'm having trouble connecting to the MySQL and I don't know where to look.

    I've posted here at haven't got a response yet.

    Here is the connection string that I believe should work. But it's giving me an error.

    Private Sub ConnectDB()
            Set oConn = New ADODB.Connection oConn.Open
            "Provider=MSDASQL;DRIVER={MySQL ODBC 5.3 ANSI Driver};" & _  
            "SERVER=localhost;" & _
            "DATABASE=randomnames;" & _    
            "USER=root;" & _     "PASSWORD=xxxxxxxx.2010;" & _
    End Sub
    This is the error that I get:
    [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

    My Favorite New Thing:
    Dynamic Named Ranges

    The alternative for
    "Press Any Key To Continue."

    and we all have one we'd like to use it on

    1. Cross Posting Etiquette
    2. Are You Here To Learn: What Have You Tried?
    3. Your Best Resource to begin learning VBA: RECORD A MACRO . . . Then Study It!

  • #2

    Check out . You might find it interesting.