Failing to open postgres db with Datagrip
# help
b
I am trying to connect to my deployed shuttle provisioned postgres db using Datagrip. I have successfully managed to get this to work for a local one but am struggling with the deployed one. When creating the new datasource on Datagrip I was able to get the necessary information from the connection string and ran the Test Connection button on that page and got a success. However, when I try and refresh to load the tables of the database I get the following error:
ERROR: permission denied for table pg_database.
Is there something I am missing here? Do I need to run something in my migrations to give me the permissions here?
e
I'm not super familiar with Datagrip and how it works, but if it requires fiddling with the primary PG databases directly then it won't work. The Postgres database is a shared server, and Shuttle manages the permissions such that each project can only interact with the tables that it has created. Accessing anything outside of that doesn't seem to work, from what I can tell. So you can run things like
CREATE  TABLE foo
and it'll work fine, but you won't have access to any of the PG system tables (is that the right term? Idk)
a
basically the above - I would consider using the aws-rds crate for shuttle if whatever you're trying to use to access the db doesn't work - you can find out more about this here: https://docs.shuttle.rs/resources/shuttle-aws-rds
personally i use psql because i enjoy hurting myself but if you want to use db admin stuff that has to interface with the primary pg database instead of being able to just use any, i would recommend the above
s
Yeah, I haven't done this myself but likely you will need to configure datagrip to look at your specific database and schemas. Likely datagrip is assuming default postgres database.
g
Commenting here because I also had the same issue yday but didnt figure it out, switched to pgadmin instead
a
honestly pgadmin is probably one of the better ones imo
s
I can vouch for dBeaver as a good way to access postgres. Community edition does get a lot of updates, but it works just fine.