When mix ecto.create gets exception:
** (Mix) The database for Socker.Repo couldn't be created: an exception was raised: ** (DBConnection.ConnectionError) tcp connect (localhost:5432): connection refused - :econnrefused
- Remove
/usr/local/var/postgres/postmaster.pidand restart postgres - If it does not work, remove
/usr/local/var/postgres/and reinstall postgres
When mix ecto.create gets exception:
** (Mix) The database for Socker.Repo couldn't be created: FATAL 28000 (invalid_authorization_specification): role "postgres" does not exist
sudo -u kelvinst psql postgresCREATE USER postgres SUPERUSER;CREATE DATABASE postgres WITH OWNER postgres;