Used Homebrew to install Postgres@16 on Mac OS X Sonoma 14.3.1.
brew install postgresql@16
When I come to connect:
psql -U postgres -h localhost
psql: error: connection to server at "localhost" (::1), port 5432 failed: FATAL: auth_permission_dialog.dialog_executable_path is not a file
2
Answers
After a reboot the error changed to:
I added a user:
Restarted the service:
All good now:
after the installation with homebrew, there is one user in Postgres (named like your login-Name e.g."YourUsername").
And there is one database with name "postgres".
Lokk at the result of
you will see what the problem is?
For your first access you should simply call.
The second parameter is just the database-name and therefore the result is something like this.
Now you can do, whatever you want. Feel free to create a database with name "YourUsername".
with the result:
Leave the cli and call psql without any Parameter.
What happend? Postgres found the default user and the default database. You can see you are working on the database YourUsername, since the result shows
YourUsername=#.
Its quite easy.