[thelist] Single or multiple MySql databases.

Jason Handby jason.handby at corestar.co.uk
Wed Oct 22 10:35:14 CDT 2008

> On Wed, Oct 22, 2008 at 4:17 AM, Duncan Hill <dunkaz at gmail.com> wrote:
> > I am building a new site that makes use of normal static html pages
> plus 2
> > separate Wordpress blogs, aMember membership management, and PHPlist
> for
> > newsletter posting etc.
> > Apart from the static pages, the other apps all run from MySql
> databases
> > ... what are the pros and cons of using either a single database
> they
> > all access, or individual databases for each app.
> >
> > I don't need to run any special queries on the databases (that I can
> > foresee).
> >
> > Many thanks for any words of wisdom.
> I assume you mean databases on the same server rather than separate
> database servers. If you put all the tables in the same database, it
> is somewhat more difficult to make sure the user for wordpress does
> not have access to aMember tables, etc. You would also need to make
> sure that table names do not conflict across applications. I don't see
> any benefit to putting all the tables in the same database in MySQL.

I'd agree with Matt -- unless you have a specific reason for wanting
everything in the same database, I'd keep them separate.

The example he gives of user permissions is a good one. It doesn't
perhaps matter so much if everything is being administered by the same
person to begin with; but what happens if you get someone else to work
on the blogs, or the newsletter, and want to give them access to only
the relevant bits of the database? Another potential future headache is
if you have to move a chunk of your work to a different host, e.g. for
ownership or management reasons. Much easier to use a separate database
from the outset, than to have to tease them apart later.

Some hosting plans charge extra for having more than one MySQL database,
so maybe that's what lies behind your question. If so, bear in mind that
the saving from having just one database might be outweighted by the
future cost of dealing with all of these complications.



More information about the thelist mailing list