pgadmin - docker
i can't connect to the database using pgadmin -> prisma working
-> psql commands works
-> config im using :
8 Replies
Hi @LifeTaker. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Based on the information provided in the knowledge sources, I can offer some guidance on connecting to the Wasp-managed PostgreSQL database using pgAdmin.
The key is to use the correct connection details that match how Wasp has set up the database. According to a Discord conversation (https://discord.com/channels/686873244791210014/1216013963528245328), Wasp doesn't put any restrictions on how you run your Postgres database. The connection details depend on how you've set up your database.
If you're using
wasp db start
to run a Postgres dev database, you should be able to find the connection URL at the very start of the wasp db start
output. You can use these same credentials to connect via pgAdmin.
Alternatively, if you're running the database on your own (e.g., using Docker), you would provide Wasp with the connection URL via the .env.server
file. In this case, you would use those same credentials for pgAdmin.
A typical Docker command to run a Postgres database for Wasp might look like this:
With this setup, the connection URL would be:
You would use these same details in pgAdmin:
- Host: localhost
- Port: 5432
- Username: postgres
- Password: devpass
- Database: postgres
If you're still having issues connecting, it might be helpful to double-check your Docker setup and ensure that the database is accessible from outside the container. Also, make sure that pgAdmin is trying to connect to the correct host and port.
If you need more specific help, please provide more details about your exact setup and the error message you're seeing in pgAdmin.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @LifeTaker, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist:
Perhaps try again in 15mins?I think we already had somebody with issue like this and solution was somethig silly, for example using localhost instead of 127.0.0.1
In general, it should work, no reason why it shouldn't. Ok, in that other convo, the reason was user was using Github Codespaces. Anything particular about your setup? But anyway, itshould work, we had other people that had it working.
i tried with douple laptops
same error
couldn't get it to work honeslty
Sorry to be the guy that says "It worked for me". But on MacOS - I installed PgAdmin 4, entered details I got from the terminal when I ran
wasp start db
and it worked 🤷♂️@miho why does @LifeTaker have different stuff in his UI? He has input password, and also different name for maintenance database then you.
My screenshot is after I saved the details - that's why there is no password field.
I didn't fill the maintenance database, that's good catch! I left it default
postgres
😄@miho interesting, maybe that is important
i will check it and get back to u guys thanks