node-pg-migrate
node-pg-migrate copied to clipboard
could not connect to postgres: error: no PostgreSQL user name specified in startup packet
I'm getting the following error:
could not connect to postgres: error: no PostgreSQL user name specified in startup packet
When I use the following command:
node-pg-migrate up --envPath ./.env.local -m infra/migrations/
My .env.local file:
POSTGRES_USER=local_user POSTGRES_PASSWORD=local_password POSTGRES_DB=controle_de_gastos POSTGRES_HOST=localhost POSTGRES_PORT=54320 DATABASE_URL=postgres://local_user:local_password@localhost:54320/controle_de_gastos
I tried to connect to my database using DATABASE_URL string and I got success.