Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to get a count of how many databases are living on my server. Should be a simple query, right?

share|improve this question

If you actually just want the count, and not a list you can also use a query like this.

SELECT count(*) FROM information_schema.SCHEMATA;
share|improve this answer
    
Thanks, y'all. For some reason google was not able to find anything useful. – Matt Herzog Sep 3 '10 at 18:27

In mysql:


  show schemas;

Quick & simple.

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.