0

Can anyone help me with this? I can connect to this remote DB from my SQL workbench, but can't get Excel to connect to it through ADO connection in VBA. getting automation error on the DBCN.OPEN line.

My provider doesn't provide direct access to SQL DB on 3306 but uses 22007 for an SSH connection.

    Shell ("""C:\Program Files\PuTTY\plink.exe"" -ssh SSH_USER@DOMAIN:22007 -pw ""SSH_PASS"" -N -L 3306:localhost:3306")

    Set DBCN = CreateObject("ADODB.Connection")
    DBCN.Open "Driver={MySQL ODBC 8.0 Unicode Driver};" & _
            "Server=DOMAIN;" & _
            "Port=3306;" & _
            "Database=DB_NAME;" & _
            "Uid=DB_UID;" & _
            "Pwd=DB_UID_PASS;"

out of interest, which ODBC driver should I be referencing in the DBCN.open line?

Image of ODBC thing on my PC

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.