Try:
psql -U user_name -h 127.0.0.1 -d db_name
where
-Uis the database user name-his the hostname/IP of the local server, thus avoiding Unix domain sockets-dis the database name to connect to
This is then evaluated as a “network” connection by Postgresql rather than a Unix domain socket connection, thus not evaluated as a “local” connect as you might see in pg_hba.conf:
local all all peer