Mint 14/PostgreSQL: Peer authentication failed for user "someuser"

After you have installed PostgreSQL 9.1 on your Linux Mint 12/13/14, created a user login, a database with that user as the owner and try to connect to that database using that user, you may run into the following error:
Password for user someuser:
psql
: FATAL:  Peer authentication failed for user “someuser”

If this is the case, you need to open up this file /etc/postgresql/9.1/main/pg_hba.conf in a text editor (with root privileges) and change this line:

local   all             all                                     peer

to this:

local   all             all                                     md5

After changing and saving the file, restart the PostgreSQL server:

sudo service postgresql restart
You should not have no issue connecting to your databases using the associated user.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s