-
DBConnection.ConnectionError) tcp connect (localhost:5432): connection refused - :econnrefused
-
postgresql: Invalid data directory | Can't open PID file /var/run/postgresql/10-main.pid (yet?) after start: No such file or directory
-
Phoenix: mix ecto.create fails
pg_lsclusters
- If you have this response:
Ver Cluster Port Status Owner Data directory Log file
10 main 5432 down postgres /var/lib/postgresql/10/main /var/log/postgresql/postgresql-10-main.log
- Change access permissions to /var/lib/postgresql/10/main
sudo chmod 700 -R /var/lib/postgresql/10/main
- Restart
sudo -i -u postgres
/usr/lib/postgresql/10/bin/pg_ctl restart -D /var/lib/postgresql/10/main
- Then, check it
Ver Cluster Port Status Owner Data directory Log file
10 main 5432 online postgres /var/lib/postgresql/10/main /var/log/postgresql/postgresql-10-main.log
Ref Link - Link
- panic: pq: unknown authentication response: 10 go
sudo -i -u postgres
psql
SET password_encryption = 'scram-sha-256';
ALTER ROLE myuser SET password_encryption = 'scram-sha-256';
ALTER ROLE myuser WITH PASSWORD 'mypassword';