psql:非法选项--user=postgres



我已经使用启动了一个postgres docker容器

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

然后尝试使用连接

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

但是,当我尝试使用Windows cmd上的上述命令连接它时,它会抛出错误:

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

提前谢谢。

按照psql --help和手动的说明使用选项--username=USERNAME

最新更新