Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test guide on macOS / Linux #2

Open
karlhorky opened this issue Nov 17, 2020 · 1 comment
Open

Test guide on macOS / Linux #2

karlhorky opened this issue Nov 17, 2020 · 1 comment

Comments

@karlhorky
Copy link

karlhorky commented Nov 17, 2020

Hi there, thanks for this cool resource!

Some connection commands (eg. the Opening a connection locally command) do not work properly on macOS - the currently logged-in system user is used to log in (at least with Homebrew):

$ psql -U postgres
psql: error: could not connect to server: FATAL:  role "postgres" does not exist

Unfortunately, the command is different on the default installation of PostgreSQL on macOS:

$ psql postgres
psql (12.4)
Type "help" for help.

postgres=#

Linux has a third way (!!) of logging in, the last time I checked:

sudo -u postgres psql

References:

@karlhorky karlhorky changed the title Test guide on macOS Test guide on macOS / Linux Nov 17, 2020
@scsskid
Copy link

scsskid commented Jul 5, 2021

As a note for using postgres docker image:

You can follow this guide:
https://towardsdatascience.com/local-development-set-up-of-postgresql-with-docker-c022632f13ea

in regard to using psql

Exec Bash in Container
docker exec -it dev-postgres bash

Start psql
su postgres (sudo doesnt work (command not found))
psql

p.s.: thanks for this quick guide @tomcam

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants