Your Drupal database name was originally created during the programs installation. Generally, this information is not needed after the initial install. However, if you ever need to work and interact directly with the database, particularly when troubleshooting, you will need to know the database name. Not knowing the exact database name can make things difficult if you have mutliple databases on your hosting account. The  instructions below will explain how to discover your database name for your Drupal 7 website.

How to find database name for your Drupal 7 site

  1. Log into your cPanel dashboard.
  2. Next, from the cPanel dashboard, locate and enter the File Manager.
  3. Now that you are inside the File Manger, navigate to the root folder for your Drupal application. If you are using your main domain, then the folder you want to be in is the public_html folder. If Drupal is being used with an addon domain, then it will be in a subfolder. For instance, if is your addon domain then the root folder will be your public_html/ folder.
  4. Once you are in the root folder installation, find for the configuration file by going to the sites and then the default folder. Using the main domain as an example, you will be under the public_html/sites/default folder path. Once there, look for the file named settings.php. Highlight the file and click on the Edit icon from  the toolbar at the top of the screen. You will then see a popup box, click the Edit button on the box to open the file editor.
  5. Inside the file editor you will see the code and settings your Drupal site uses. The database settings are located after a giant block of commented text, around line 208. The line of code with the database name looks similar to the one below:
    'database' => 'userna5_drpl111',
    The database name is composed of two parts, the username and the actual database name. From the example given above, the username portion is userna5 and the database name is drpl111.
  6. Be sure to write down the database name in a safe place so you can find it later. This is the name you will look for when you are managing the database via your phpMyAdmin tool.


Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve this article:
Email Address

new! - Enter your name and email address above and we will post your feedback in the comments on this page!

Did you find this article helpful?


n/a Points
2014-11-17 10:20 am

Helpful info I have several installs and when you just let drupal install and setup its own mysql it can be confusing as to what you need to back up or migrate!

Very useful Thanks a bunch!

Post a Comment

Email Address:
Phone Number:

Please note: Your name and comment will be displayed, but we will not show your email address.

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Need More Help?

Help Center Search

Current Customers

Email: Ticket: Submit a Support Ticket
Call: 877-595-4HUB (4482)
757-416-6627 (Intl.)
Chat: Click To Chat Now

Ask the Community

Get help with your questions from our community of like-minded hosting users and Web Hosting Hub Staff.

Not a Customer?

Get web hosting from a company that is here to help.