On Oracle MySQL Cloud Service (MySQL CS): "ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)" (Doc ID 2221184.1)

Last updated on MARCH 08, 2017

Applies to:

MySQL Server - Version 5.7 and later
Oracle MySQL Cloud Service - Version N/A and later
Linux x86-64 on Oracle Public Cloud

Symptoms

When trying to connect to MySQL using the Unix socket in an Oracle MySQL Cloud Service, the following error occurs:

 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms