How to find your database name in osCommerce

Working with your osCommerce site you will be able to make most changes for settings within the administrative panel. However, you may need to access the database directly, most often during troubleshooting. To do this, you will need to know the exact database name. Below are the instructions that will help you find the exact database name your osCommerce application is using.

Finding your database name in your osCommerce application

  1. First, log into your cPanel.
  2. This leads you to the main cPanel screen. From here, enter the File Manager section.
  3. Now that you are in the File Manager, you will need to navigate through the folders your osCommerce store root folder. For example, if your store is using your main domain name the folder you want is the public_html folder. If you are using a subfolder for your store, such as then it would be under a folder with that name (public_html/store)
  4. Once you locate the root folder for your store, click on the includes folder.
  5. Inside the includes folder you will see many files. Find and highlight the file names configure.php file, then click on the Edit button located in the toolbar at the top of the screen. You will be met with a popup box, click the Edit button there as well.
  6. Once inside the editor, you will see a lot of code which is a list of various settings. The line of code you want is the one with the DB_DATABASE setting. At the end of the lien of code, you will find your database name. Below is an example of the correct line of code.

    define('DB_DATABASE', 'userna5_osco123');
    The database name parameter is composed of two parts has two parts. Using our example, userna5_osco123 the first part coded in red, userna5 is the cpanel username, followed by the actual database name coded in green _osco123.

  7. Be sure to write down the database name for later use. Now you can locate the correct database when working with phpMyAdmin or other database management tools.

Was this article helpful? Join the conversation!

Leap into Savings
Leap Ahead with Limited Time Deals