-
Hi, I have been using the local docker setup for fusionauth with a local postgres db until now. Now I wanted to switch to a hosted DB solution, where I do not want to give the root passwords to the fusionauth app, but instead set up the DB schema manually. This worked so far without any problems, but I was wondering whether I could install the DB schema as a non-default schema instead of using the
publicschema which is provided by the DB at launch?I was able to set it up and create a user, but the connection url
jdbc:postgresql://db:5432/fusionauthand the config files do not provide the possibility to select a specific schema on the DB and default automatically topublic.Such as
CREATE SCHEMA my_fusionauth_schema AUTHORIZATION postgres; ALTER DEFAULT PRIVILEGES IN SCHEMA my_fusionauth_schema GRANT INSERT, SELECT, UPDATE, DELETE ON TABLES TO fusionauth;
Thank you for your answer ansd clarifications.
Cyrill
-
Hmm. I don't know. Is there a way to specify the schema on the JDBC URL?
https://stackoverflow.com/a/4820666/203619 looks promising, that's what I'd try.
-
This is something I have already tried ad did not work. At least not with my setup. I have changed my setup and use now two databases instead of two schemas.
-
Excellent, thanks for looping back. If you'd like, feel free to file an issue about supporting non
publicpostgresql schemas: https://github.com/fusionauth/fusionauth-issues/issues -
I was able to get this working with:
jdbc:postgresql://db:5432/mydb?currentSchema=auth -
D dan moved this topic from Q&A on
-
D dan moved this topic from Frequently Asked Questions (FAQ) on
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login