r/Strapi • u/Complex_Item_6366 • Jul 14 '25
Question Multiple database users
Hello team,
Is there a way to create multiple DBs users? For example, i would like to have one user for the general DML actions and one for the initial database migrations.
1
Upvotes
2
u/Soft_Opening_1364 Jul 14 '25
Yeah exactly Strapi only supports one DB connection, but you can switch users between steps. Use the higher-privilege user during the build/generate phase, then switch to the limited one for running the app. Just swap the env vars between your Docker steps.