Toolbar with database name
Status Report with database name
Admin Menu with database name

Overview

Display the host and database name of the default database on the status report, toolbar (Drupal 7) and/or on the admin_menu bar if enabled (either Drupal 6 or 7) and/or in a block (to use with the admin module).

The genesis of this module came about as once again I copied a website to a development instance and forgot to change settings.php to use the a development database, and ended up making changes to production when I just wanted to try something on development.

There are two use cases for this module:

  1. Give a quick way to identify which database you are using when switching from development to staging to production.
  2. When you are given a website to maintain and you are trying to figure out which of many databases are actually driving the content you are seeing.

The module just reports what comes from settings.php and makes no attempt to test the database connection.

Installation

  • Install as usual, see http://drupal.org/node/70151 for further information.
  • The module adds a permission, "view database name", which is used to control who can view the database host/name.

Credits

This project was sponsored by the New York State Office of Information Technology Services Web Services Department.

Similar projects

There is a similar module, dbinfo, that can display more information on the status report, with a dependency on CTools, and doesn't display the information on the toolbar or admin_menu bar.

Drupal 8 Version

A Drupal 8 port of the module is located at Show Database Name D8

Project information

Releases