I want to see the data in tables of my database
is there any way to see data in database like normally we can connect our postgres database to pgAdmin?
If you want to check the tables in your database you can do this:
flyctl ssh console --app postgres-app-here psql -h 127.0.0.1 -U user-you-want-here
psql you can use the command
\d to list the tables in your database.
For accessing it through pgAdmin, it’s a bit different. The database is accessed by your other apps over private networks, so you’ll need to make a tunnel between your computer and the database. You can use Wireguard to create a tunnel. Then you can connect to the database in pgAdmin with the internal address (e.g.
paulgra-ham.internal) and your credentials.
You can read more about how to setup Wireguard with this reference:
can you please help me in it I’m still not sure how to do it I have tried steps over there but it does nothing for me
usama@Usamas-MacBook-Pro chatapp % flyctl proxy 5432 -a my-db usama@Usamas-MacBook-Pro chatapp % psql postgres://postgres:password@localhost:5432 psql (14.1) Type "help" for help. postgres=#
How to connect fly.io postgres to pg_admin any step by step guide please
Did you let the
proxy command keep running? You can’t cancel it, it needs to stay running in a tab.
psql command looks like it might have worked. You could also connect from something like Postico, which is a little easier than a CLI. If you want to use
psql you can actually run:
flyctl pg connect -a <db-name>
Then follow these instructions: psql command line tutorial and cheat sheet | postgres
You’ve forwarded the database port to port 5432 on your computer (localhost).
At this point it’s just a matter of setting up pgAdmin or whatever other client you want to use. Server Dialog — pgAdmin 4 6.5 documentation