0

I am trying to view rows and run queries in my heroku postgres database using the heroku pg:psql command but I always get this error : --> Connecting to postgresql-tapered-69603 psql: error: connection to server at "ec2-52-45-168-55.compute-1.amazonaws.com" (52.45.168.55), port 5432 failed: FATAL: no PostgreSQL user name specified in startup packet connection to server at "ec2-52-45-168-55.compute-1.amazonaws.com" (52.45.168.55), port 5432 failed: FATAL: no PostgreSQL user name specified in startup packet ▸ psql exited with code 2

I have tried using the following commands in iterm but always get an error: heroku pg:psql, heroku pg:psql DATABASE_URL

0

2 Answers 2

0

If you're on macOS and installed the psql command with Homebrew, upgrading the postgresql package may resolve the problem. I'm on postgresql@14 and running the commands below did it:

$ brew update
$ brew upgrade postgresql@14
Sign up to request clarification or add additional context in comments.

2 Comments

now Im getting this error : psql: error: connection to server at "ec2-52-45-168-55.compute-1.amazonaws.com" (52.45.168.55), port 5432 failed: server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. SSL SYSCALL error: Connection reset by peer connection to server at "ec2-52-45-168-55.compute-1.amazonaws.com" (52.45.168.55), port 5432 failed: FATAL: no pg_hba.conf entry for host "70.158.100.168", user "mdybmwtjrfomll", database "debr7aun1sbau3", no encryption ▸ psql exited with code 2
I'm sorry I cannot reproduce the problem where psql doesn't try to encrypt the connection. Running the command with debug flag might show why: ``` HEROKU_DEBUG=1 heroku pg:psql ``` or ``` DEBUG='*' heroku pg:psql ``` Please note the the commands above expose the credentials.
0

I just had to update postgresql

1 Comment

What did you upgrade it from and to? That will help make sure people reading this in the future understand the context and scope of your solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.