Mysql – How to connect to a network MySQL server using ODBC


Somewhere on my company's network there's a (Oracle) MySQL server named FOO. I see FOO reference in SAS code written by my team's analysts, who use SAS's PROC SQL command to connect to it using ODBC.

I need to connect to FOO in a MySQL client rather than SAS. Unfortunately for me, I'm not able to figure out how to do so using Oracle's MySQL Workbench, Microsoft SQL Server Management Studio (if even possible with Oracle rather than MS SQL), or SQL Workbench J using an Oracle driver.

The information required by Oracle's MySQL Workbench and others seems to go beyond the information that's available in Windows' ODBC Administrator profile for FOO (or any other ODBC DSN). The New Connection wizards request an IP address and port number, whereas the information I have on the ODBC connection is just:

  1. DSN: FOO
  2. User: Username
  3. Password: Somepassword
  4. Schema: Schemaname
  5. Type/driver: Oracle
  6. TNS Service Name: Somename

I downloaded and installed MySQL Connector/ODBC, but it seems that's mainly for creating ODBC connections rather than using them. I did figure out how to use ODBC to migrate a server in MySQL Workbench, but that's not what I want to do — I just want to query the server.

How can I connect a SQL client (ideally MySQL Workbench, but I'm flexible) using only this ODBC connection/information?

Best Answer

Is FOO a DSN or a server name? on workbench you need the server name, mysql username and the mysql password. Thats all you need to connect to your mysql server using mysql workbench.