Share one database with two Moodle instances

Re: Share one database with two Moodle instances

by Ken Task -
Number of replies: 2
Picture of Particularly helpful Moodlers

Why?

Can think of more negatives than pluses ...

for one, very complicated config file for 2 sites - have seen such a set up for 4 sites.

updates ... which come frequent enough that updating the DB for each site becomes 'an adventure' ... and actually takes longer + more prone to human error.

upgrades ... even more prone to human error ...

Neither of those should be using the GUI/Web based updates or upgrades.

How does one test plugins???

So yeah could have one code base ... 2 moodledata directories ... 1 DB **if** one site uses Amdl_  prefix and the other site uses Bmdl_ prefix.

Oh, yeah ... let's talk about that single database ... logstore_standard_log table for one site gets in the 2 Gig range farily quickly .. X 2 ... 4 Gig's ... just for the 'who done it' table.   So memory usage of server (DB memory) will need to be monitored and increased more frequently.  Of course if you had a dedicated DB server with plenty of RAM to begin with ... no problem.

So again ... why? smile

'SoS', Ken

Average of ratings: Useful (1)
In reply to Ken Task

Re: Share one database with two Moodle instances

by Andrew Lyons -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers
I think you're over-thinking things. One Database does not mean one set of tables. We really don't have that many tables in Moodle that this is a problem. Memory is generally not a problem either. No more than having multiple DBs on the same server.
In reply to Andrew Lyons

Re: Share one database with two Moodle instances

by Ken Task -
Picture of Particularly helpful Moodlers

Yep!  Guilty - over thinking.

LIke I mentioned, had seen a site such as described ... K12 - elem, intermediate, jh, and a hs.  Lesser used elem and Intermediate campuses.

Once admin got them all to a version, that's where they stayed the remainder of that academic year.  No look-sees at themes nor plugins. Now I know I've never seen a '0 day flaw' officially announced concerning Moodle code but did see one about libraries used by Moodle code the other day.  Personally, I get nervous if not running supported anything.

Is there any official Moodle docs that describe how to set one code base, one DB, for multiple sites ... URL please.

And one of these days, I'll learn not to respond in developers! :| ... just 'lurk' in learning mode.

'SoS', Ken