Skip to content

unix-socket

2 Posts

PostgreSQL Socket '.s.PGSQL.5432': No Such File or Directory

'.s.PGSQL.5432: No such file or directory' means psql looked for a Unix socket in one directory and found nothing. The server is stopped, on another port, or puts its socket somewhere else. Here's how to tell which, and fix it.

ERROR 2002: Can't Connect to Local MySQL Server Through Socket

ERROR 2002 means the MySQL client went looking for a Unix socket file and never reached a server. Here's how to tell a stopped server from a socket in the wrong place, read the number in brackets, and fix it for the CLI, PHP and Python.