How I can connect to the Postgres database, that was created as part of
fly deploy command result?
So far I have tried the below, but nothing worked for me,
flyctl postgres connect
fly proxy 6543:5432 -a <app_name>
Could someone help me, Thanks in advance
I don’t have any error logs, but they hung upon issuing the command, below is the screenshot for the same.
Hi @lakki, if you share the output you saw when you tried these commands, it will be easier to help you get to the bottom of this.
Thank @catflydotio for pointing it out, I have updated the question with the issue screenshot. May be I am using wrong command completely.
With this info I have a couple of suggestions.
fly postgres connect -a <app-name>. If the
fly.toml belonging to the app you want to connect to is not present in your working directory, you need to specify the app to apply the command to.
The proxy command output looks as you’d expect it to. It doesn’t return because, well, it needs to keep proxying that port until you’re done using it. You’d have to open another terminal and do something like
to get a Postgres shell this way.