IBM Support

ODBC Connector not able to connect to remote MySQL database fails with error "Can't connect to local MySQL server through socket '/tmp/mysql.sock'"

Troubleshooting


Problem

When trying to run a Parallel job with an ODBC Connector connecting to a remote MySQL database, using an ODBC DSN defined with the MySQL provided driver (i.e libmyodbc5w.so), the job may fail with the following error message:

ODBC_Connector_0: The connector could not establish a connection to data source <Database_Name> using user <mysql_user>.
ODBC_Connector_0: ODBC function "SQLConnect" reported:  SQLSTATE = 08S01: Native Error Code = 2,002: Msg = [MySQL][ODBC 5.3(w) Driver]Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

Though the database is remote the error message implies the driver is trying to connect to a local MySQL server.

Document Location

Worldwide


[{"Line of Business":{"code":"LOB76","label":"Data Platform"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSZJPZ","label":"IBM InfoSphere Information Server"},"ARM Category":[{"code":"a8m50000000L0y3AAC","label":"DataStage-\u003EJob Stages-\u003EDatabase Stages-\u003EODBC Connector"},{"code":"a8m500000008gobAAA","label":"DataStage-\u003EOEM - 3rd Party Products-\u003EDataDirect ODBC-\u003EODBC Driver Issues"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.5.0;11.5.1;11.7.0;11.7.1"}]

To view more of this document

This document has the abstract of a technical article that is available to authorized users once you have logged on. Please use the link to actual document below to access the full document. You will be asked to log on if you are not already logged in. After log in, if you do not have the right authorization for this document, there will be instructions on what to do next.

Document Information

More support for:
IBM InfoSphere Information Server

Component:
DataStage->Job Stages->Database Stages->ODBC Connector, DataStage->OEM - 3rd Party Products->DataDirect ODBC->ODBC Driver Issues

Software version:
11.5.0, 11.5.1, 11.7.0, 11.7.1

Document number:
6412221

Modified date:
25 April 2025

UID

ibm16412221

Manage My Notification Subscriptions