PostgreSQL no password supplied

Posted by Baranger Benjamin

about 1 year ago

1

postgres server rails

Error message:

activerecord::ConnectionNotEstablished: connection to server on socket "/tmp/.s.PGSQL.5432" failed: fe_sendauth: no password supplied


You might end up having this issue if you have a postgreSQL Enterprise version installed on your mac. PotsgreSQL installed from brew won't work until you have removed the enterprise version.

How to check?

ls /Library
If you have a PostgreSQL folder in there, you have an enterprise version installed, if not this solution is not for you.

How to uninstall PostgreSQL Enterprise:
Run the uninstall file present in /Library/Postgresql/13(or the version you have installed)
If the file is not present you can reinstall the enterprise version from
here. Running the installer will re-generate the uninstaller file in the folder.

Uninstall all postgresql installed with brew:
brew uninstall postgresql@13 (adapt to your version)

Run:
brew update
Run:
brew doctor
Run:
brew install postgresql
Run:
brew install postgresql
Voila