Same database for multiple instances

Is it possible to use single database for multiple instance’s.

Any response is highly appreciated.

Can you please explain topology?

It a kind of star topology where all instance’s need to access from same database.

Any response is highly appreciated.

Consider using a DBaaS or setting up your own MariaDB server?

I don’t know if multiple accounts can access it, but I get the feeling they should be discrete logins.
The ElasticRun guys had a presentation from day 3 of the conference where they did the opposite - splitting the DB depending on a user preference (in their use case it mapped to physical locations). That might give you some clues.

The talk may be here for example [Conference 2018] Playlist of ERPNext Conference 2018

Hello, Yes it is very possible. Your answer lies in this webpage:
All you need to do is to setup your first instance with its database, then setup the second one and edit the site_config file of the second instance to connect to the 1st DB.

  1. If instances are on the same server, just change db_name AND db_password to match the 1st instance’s.
  2. Else if on remote / seperate server, add the parameter db_host: Database host (domain/ip) and configure for SSL.


Is it safe to do this? Especially if both the Sites will write to database? Any caching issues that we need to be aware of?


In essence, everying is the same except that the two instances are writing to the same DB. You have to however make sure the frappe, erpnext n other apps’ versions match to make sure the instances’ database schema are identical.
In terms of caching, u may need to clear bench clear-cache once after installation otherwise going forward, the DB is queried each time a request is made so information is relayed real time among instances.

You can try by setting up a separate server to test and confirm my theoretic facts.