Forums

Help connecting pgAdmin4 to postgresql

Hi, newbie user here.

I have searched for clear answers but to no avail. I want to connect pgAdmin4 on my local Windows machine to my pythonanywhere account (includes postgresql) but I cannot make it work.

I am able to tunnel SSH into my area and see that postgresql is installed, I can move around my home, etc.

But when I try to connect (creating new server plus connection) in pgAdmin4 (using username super and password as setup on the database tab of pythonanywhere, and through the tunnel I set up) I get

Error saving properties: UNAUTHORIZED Unable to connect to server: server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request.

So I am stuck. Is there a how-to for doing this that could walk me through the steps ? I am not terribly experienced but I am learning. I need to develop in python with flask against a postgresql DB and the idea of doing it over the net all through pythonanywhere is cool, but I haven't gotten it to work yet.

is it a question of modifying postgresql.conf and pg.hba.conf in some way to accept an incoming connection through the tunnel ? Or something more basic. (btw, I tried to vi into pg.hba.conf to make the usual change - in case required ) through my tunnel session but I am forbidden ... )

Thanks for your help

Jon

hmm- can you confirm what pgAdmin4 configs you are using? db host name/ssh tunnelling server/username etc