Connecting to database in windows powershell

Hi, I created a database on free version. I have connected to it in pgAdmin4. I am now trying to connect to it in windows terminal(powershell) but so far I am not able to.

My powershell command is: 'psql -U ‘ database username’

I am then prompted for a password, for which I use the password given to me in my database. When I press enter, I get an error saying:

psql: error: connection to server at “localhost” (::1), port 5432 failed: FATAL: password authentication failed for user “Username”.

I am not sure why I can’t connect to the database in windows terminal when I can connect to it in pgAdmin4 just fine. Please help, thanks.

mydb is the database server that I connected to just fine in pgAdmin4, but can’t for some reason in windows powershell.

What about using the PSQL command that we provide for the database in the dashboard for the DB? You’re missing attributes there with what you’re using,

Ok thanks for the advice. I used the psql command starting from ‘psql -h’, and was prompted with a password. And I put in the value of the password that I got from the psql command(this is the same password as is given for the ‘Password’ field of render, > dashboard > database > connections > Password).

I get an error saying Connection to server at… failed: Fatal: database ‘database’ does not exist