Hello, I'm trying to setup my Postgres DB as a des...
# ask-community-for-troubleshooting
i
Hello, I'm trying to setup my Postgres DB as a destination with Airbyte running locally. It works fine when I use a super user, but doesn't work with my dedicated Airbyte user. I can connect without an issue when accessing the DB directly with that user, but Airbyte gets a "Could not connect with provided configuration. ERROR: permission denied for database <database>". Any idea? The DB is hosted on AWS RDS, but the IP is allowed (and again, it works when using a super user, and when accessing it via other tools). Thanks in advance!
1
u
It works fine when I use a super user, but doesn't work with my dedicated Airbyte user.
this works fine when connecting using Airbyte but with the super user?
i
Yep, if I use the super user in my Airbyte config it works.
So it seems than it's not a problem with the database itself.
u
Can you confirm you gave the right permissions to
airbyte
user?
i
I confirm indeed.
It would give me a different error though, since I can access the DB with the airbyte user? 🤔
u
Probably, if you dont have access to your database the error should be: Could access database IP-POSTGRES-RDS. not permission denied
did you commit the grant schema for the airbyte user? (not pro on Postgres syntax if this is needed)
i
I don't think that's necessary indeed, I can see that they are set the correct way in DB.. I'm probably doing something so stupid I can't see it. 😅 I'll try again later with a clearer mind, thanks for you help in any case. 🙂
Well actually, found the culprit!
airbyte rocket 1
The user needs to be able to create schema as well, I checked my logs, the connection succeeded, but then it was trying to create the schema (if not exists), and that's what was going wrong.
I don't know how easy that would be, but it would be pretty useful to add the details from the error.
The actual error was
Copy code
ERROR: permission denied for database <schema>
STATEMENT: CREATE SCHEMA IF NOT EXISTS <schema>
with the second line it was obvious.
(Note that I could have thought earlier about checking the logs too. 😅 )