Skip to content

Connecting to Postgres on Ubuntu using connectionString #161

@phillpeters

Description

@phillpeters

I'm trying to connect postgrator to postgres from node on an Ubuntu install in WSL2 using a unix domain socket connection. This is my connection string (I've tried many other formats as well): postgres://user:password/dbname.

Every time I try to run a migration, I get this error: Error: SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a string. I get this error no matter how I've formatted the connection string. From what I've found online, if I omit the hostname from the connection string then the connection should default to using the domain socket. But postgrator seems to be wanting to make a different kind of connection.

I am also using Knex in my project to make calls to the database from node. I am using the exact same connection string as above with Knex with no issues. I don't know if this is a bug with using connection strings with Postgrator or if my config has an error. I appreciate any help I can get!

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