Kunal Singh
Kunal Singh

Reputation: 3

psql: illegal option -- user=postgres

I have launched a postgres docker container using:

docker run -d -e POSTGRES_PASSWORD=x -p 5432:5432 
registry.gitlab.com/dalibo/postgresql_anonymizer

and then trying to connect it using:

set PGPASSWORD=x
psql --host=localhost --port=5432 --user=postgres

But,when i am trying it to connect it using the above commands on the Windows cmd, it is throwing error:

C:\Program Files\Docker\Docker>psql --host=localhost --port=5432 --user=postgres
psql: illegal option -- user=postgres
Try "psql --help" for more information.

Thank you in advance.

Upvotes: 0

Views: 1348

Answers (1)

Islingre
Islingre

Reputation: 2349

Use the option --username=USERNAME as described by psql --help and the manual

Upvotes: 1

Related Questions