Skip to content

Failed to connect to pgsql at "127.0.0.1" (port 5432) as user "postgres": Database error: Socket error in "connect": ECONNREFUSED (Connection refused) #1697

@tanktank47

Description

@tanktank47

I have MySQL 9.5 and PostgreSQL 18.1 and installed pgloader in a Docker Engine environment.
MySQL 9.5 and PostgreSQL 18.1 are now running.

While executing the pgloader command in PowerShell with the following command,
an error occurred.
The error message indicates that the PostgreSQL connection was refused.
No matter what I try, I cannot find the cause of the issue.
However, PostgreSQL is connecting fine in DBeaver.

① PowerShell Command:
docker run --rm -it pgloader-image pgloader -v --debug
"mysql://root:rootpassword@127.0.0.1:3306/MY" `
"postgres://postgres:mysecretpassword@127.0.0.1:5432/postgres"

② Error Message:
Failed to connect to pgsql at "127.0.0.1" (port 5432) as user "postgres": Database error: Socket error in "connect": ECONNREFUSED (Connection refused)

Have a Good Day!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions