How To Get The Current Database Name In MySQL

Software

I just upgraded my WordPress installation to 2.6.3 and have a few tips to blog about for all of you Google searchers.

To find the current database in a MySQL prompt, type the following:

mysql> select database();

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Furl
  • Ma.gnolia
  • Reddit
  • TwitThis
2 Comments

2 Comments

  1. Govindarajan  •  May 29, 2009 @1:03 am

    Thanks for the help!! great website

  2. hacker  •  Nov 3, 2009 @4:12 am

    Thanks man, you made my day

Leave a Reply

Allowed tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">