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
- First, log into your cPanel.
- This leads you to the main cPanel screen. From here, enter the File Manager section.
- 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 example.com/store then it would be under a folder with that name (public_html/store)
- Once you locate the root folder for your store, click on the includes folder.
- 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.
- 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.
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.
- 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.