Can we use multiple database with single code base

Please tell me,
Can we use multiple database with single code base. I want to switch database at runtime to connect with different url and data base.
example
directory www/owncloud
databases db1,db2
can i switch betwee them on url base

This is not supported (and wouldn’t bring any benefit, too). Database settings are defined in config.php where only exactly one can be used.

Your goal can be easily acheived by creating the folders owncloud1 and owncloud2 in your www directory. Then have virtual hosts using the different document roots, so you would be able to have multiple instances on one server.

Note: Under no circumstances do use the same data directory or else both setups will be messed up. Every instance need their own data directories

1 Like