Mario database logging

Hi! I got problem with logging into the postgres service to build a Mario database. I’ve tried to find a solution for this issue.

I follow TUTORIAL.md and try to log in using command below:

psql --username=freecodecamp dbname=postgres

then I got the following error:

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?

then i tried to restart using command:

sudo service postgresql restart

after that i got error message when trying to log in :

psql: error: connection to server on socket “/var/run/postgresql/.s.PGSQL.5432” failed: FATAL: Peer authentication failed for user “freecodecamp”

I’m having the same issue. I can’t find answers anywhere.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.