How validate postgresql credentials in ubuntu or any linux machines?

Siva
1 min readFeb 20, 2019

--

I had issues while trying to create databases using postgres db default users in linux environment.

The ecto wasn’t able to communicate with dbs default credentials and threw the below errors.

15:26:45.138 [error] GenServer #PID<0.217.0> terminating
** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "postgres"
(db_connection) lib/db_connection/connection.ex:84: DBConnection.Connection.connect/2

The below ugly fix made it working in Ubuntu 18:04. However, in future I would like to get installation package or use docker to avoid such development errors.

sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';" sudo /etc/init.d/postgresql restart`

Reference:
https://github.com/elixir-ecto/ecto/issues/1207#issuecomment-259581429

--

--

No responses yet