Search code examples
mysqlexcelodbc

Unable to connect via ODBC in Excel (while connection test works fine)


Since I don't like reading long questions myself I'll make it quick and dirty:

Starting Point:

  • MySQL DB on Server
  • Win10 machine with Excel (Office 365)
  • ODBC Driver installed
  • Test with ODBC connector works fine: ODBC Test

Goal:

  • Connecting from Excel to the DB via ODBC

Problem:

  • When choosing the DSN, the following error appears: enter image description here

!BUT! I can connect from other workstations just fine (same setup/credentials).

Checklist:

  • IP from this (and other workstations) are allowed on the server (and are correct)
  • Excel and drivers are all 32 bit (checked on excel 64 with correct driver, same problem)
  • Since the connection test is successful, the login credentials are obviously correct

Steps taken in excel:

  • open Excel
  • choose ODBC:

enter image description here

  • choose saved (and tested) connection and press "ok": enter image description here

No further steps are taken within excel.

What else could I check? What am I missing here?


Solution

  • The error message shows that MySQL is receiving esa as the username. Double-check that your DSN does not have the wrong username value saved.

    I'm guessing that your Windows, Excel, and intended ODBC driver are all 64-bit.

    You might have a 32-bit User DSN that's getting in the way of a 64-bit User DSN; best to only use System DSNs on 64-bit Windows, as discussed here. Be sure to use both 32-bit and 64-bit ODBC Administrators (C:\Windows\SysWoW64\odbcad32.exe and C:\Windows\System32\odbcad32.exe, respectively) to check.