FATAL: password authentication failed for user "root" in TablePlus

875 views Asked by At

So I was following up with a udemy course on backend development using PostgresSQL, Docker, GO, Kubernetes and got stuck here in the authentication part.

I created my postgresql container : docker run --name postgres12 -p 5432:5432 -e POSTGRES_USER=root -e POSTGRES_PASSWORD=secret -d postgres:12-alpine While using tableplus, I encountered this problem even after entering the correct password.

Here is the image

2

There are 2 answers

0
Luka_mindo On BEST ANSWER

For me solution was to disable local postgresql service since i have already installed it on my machine and as aziz said TablePlus will refer to the password you set to your psql user, instead of the one you've written when running container, so SOLUTION for windows is next:

  1. open run app (windows key + R)
  2. type services.msc and click ENTER
  3. find postgreesql service and stop it. image
1
Aziz Sharipov On

I encountered the same issue recently. It might be because you have postgres already installed on your machine, so TablePlus will refer to the password you set to your psql user, instead of the one you've written when running container. At least this is what happened to me. The solution is to use your main postgres user password.