Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

We're a small startup and I need to setup several applications, almost all of which require a database.

I face the choice of setting up one instance of MySQL, with one database for each of our applications, or of setting up a separate instance of MySQL for each application.

What is the generally accepted best practice in this situation? One database to serve them all, or divide and conquer?

share|improve this question

4 Answers 4

Knowing nothing else, simpler is always better. One instance.

share|improve this answer
Is that really simpler? Generally all setup instructions seem to be written from the perspective that the mysql server will only be hosting that application. Setup documents don't seem to do a very good job about telling you how to setup permissions correctly to separate various applications. If you are only looking at this from the perspective of simplicity I don't think you can make a strong case for a single database server, there are pros and cons both ways on this point. –  Zoredache Sep 16 '10 at 21:44
BTW, I am not saying I disagree with the single instance recommendation, I am just saying that it may not be as simple as it looks/sounds. –  Zoredache Sep 16 '10 at 21:45

Agree with others - one instance of mysql, but:

  • seperate databases for each app
  • seperate user/password for each app

This will make it much simpler to migrate later. However do use innodb rather than c-isam as your storage engine - the latter (IIRC) still only process one request at time.

When you do need to upgrade to multiple servers, then I'd recommend using master-master replication so that each node still serves all the databases rather than splitting it, until you get to about 4 nodes, then start partitioning based on database.

share|improve this answer

One instance of MySQL, multiple databases is best practice.

I can't think of many scenarios where the ideal situation would be to run multiple instances of MySQL with one database per instance. It seems silly.

share|improve this answer

Once instance is better because:

  • you can use all available resources (ram and disk space)
  • mysql can assign the resources if needed
  • caching will be able to use the max. amount of memory (no stale caches)
  • single place for managment
  • easier to maintain
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.