Postgres error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432"

Hey.

I started to use openSUSE (Tumbleweed) for a few time, I tried to install PostgreSQL, but I had some problems. I used this tutorial for the installation: https://en.opensuse.org/SDB:PostgreSQL

I enabled and started the Postgress process, but when I try to run

psql

or

sudo -u postgres -i

I get:


psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" 
failed: FATAL:  role "myuser" does not exist

The role part is kinda easy to solve, but I’m stuck at the “connection to server”. I can’t find pg_hba.conf file too.

ps -ef | grep postgres output:


ps -ef | grep postgres 
**postgres**  7857     1  0 15:38 ?        00:00:00 /usr/lib/**postgres**ql14/bin/**postgre**
s -D /var/lib/pgsql/data 
**postgres**  7858  7857  0 15:38 ?        00:00:00 **postgres**: logger  
**postgres**  7860  7857  0 15:38 ?        00:00:00 **postgres**: checkpointer  
**postgres**  7861  7857  0 15:38 ?        00:00:00 **postgres**: background writer  
**postgres**  7862  7857  0 15:38 ?        00:00:00 **postgres**: walwriter  
**postgres**  7863  7857  0 15:38 ?        00:00:00 **postgres**: autovacuum launcher  
**postgres**  7864  7857  0 15:38 ?        00:00:00 **postgres**: stats collector  
**postgres**  7865  7857  0 15:38 ?        00:00:00 **postgres**: logical replication lau
ncher  
santiago 10202 23667  0 16:01 pts/1    00:00:00 grep --color=auto --exclude-dir=.
bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --e
xclude-dir=.idea --exclude-dir=.tox **postgres**

Also, when I use psql -U postgres, it outputs:


psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" 
failed: no such file or directory
        Is the server running locally and accepting connections on that socket?