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

Is there a limit of the number of databases a single MySQL server can handle?

share|improve this question

3 Answers 3

up vote 4 down vote accepted

I'm unable to find any record of MySQL having a limit in the documentation.

If you're using MyISAM, you may run into a limit on the number of open file handles you can have as it uses several files per table. You can raise this using ulimit. InnoDB normally uses one file for all databases and two for database journal logs, but you still have one metadata file per table so this shouldn't be so much a problem unless you've configure InnoDB to do one file per table.

Regardless of open file handle limits, you'll find practical limits due to filesystem performance with many files in a directory structure, but we're talking several thousand in the same directory. If you get to this point, you're doing something very wrong.

share|improve this answer

I have never come across a hard limit to the number of databases one on server, it will depend on the size and the traffic of each of the databases, I have certainly had single servers with in excess of 2000 databases, however the databases were only used by a handful of students at any one time.

share|improve this answer
    
My situation is quite similar in that I have a lot of databases but they are not used intensely. –  Luke Jun 6 '09 at 21:49

I don't know the exact limit, but you'll run out of system resources long before you'll run out of databases. I've seen installations with 500+ databases.

I've even seen multiple instances of mySQL with multiple databases running.

Now, whether the client SHOULD have had 500 databases on that system is a totally different question. LOL!

The hardware you run on is definitely going to be a determining factor.

Hope this helps.

share|improve this answer

Your Answer

 
discard

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.