Multiple Moodles: Multiple DB's?

Multiple Moodles: Multiple DB's?

by Brian Donohue-Lynch -
Number of replies: 2

This question, among other things, shows the limits of my big-picture grasp of Moodle setup.  I have successfully installed Moodle on a remote server, and on my office server.  I am interested to set up a second instance of Moodle on the remote server.  Would this require a second database setup, or could it share the same database as the first installation?  (I imagine that if I actually started to set this up, I might answer my own question by trial and error, but I am nervous about messing up the first instance of Moodle in the process.)

Brian

Average of ratings: -
In reply to Brian Donohue-Lynch

Re: Multiple Moodles: Multiple DB's?

by Gustav W Delius -

The two Moodles could share the same database but they should then use different table prefixes. You set the prefix in config.php. You probably have something like

$CFG->prefix    = 'mdl_';

for your first Moodle and would want to change mdl_ to something else for the second.

In reply to Gustav W Delius

Re: Multiple Moodles: Multiple DB's?

by Brian Donohue-Lynch -

Again... a most helpful, and effective, reply! Thanks.  I just set up the second instance of Moodle, and seem to have everything running well. 

Your help is much appreicated.

Brian