301: How to locate your SMF 2.0 installation's database name
Your SMF database name was originally created during the programs installation. This information is usually not needed during routine work as the vast majority of settings and features can be handled within the SMF administation section. However, if you ever need to work directly with the database, particularly when troubleshooting, you will need to know the database name. As many hosting accounts contain more than one database, not knowing the exact database name can make things difficult. Below we will discuss how to locate the database name for your particular SMF installation.
Finding your database name in SMF 2.0
- First, you will need to log into your cPanel account.
- Next, you will need to open and enter the File Manager tool.
- From the File Manager, you will need to locate and move to the root folder for your SMF installation. If you are using your main domain, the root folder will be public_html. If you are using a domain name, then it will be under public_html/domainname (For example, if example.com is an addon domain, you will need to fin the public_html/example.com folder)
- Once in the root folder for your application, you will see many files. The find the Settings.php file. Highlight the file and then click on the Edit button found in the toolbar across the top of the screen. A popup will appear on the screen, click the Edit button there as well.
- Once in the editor, you will see a lot of different settings for your SMF program. Around line 30 you will see the code for the database name. It appears like the example below:
$db_name = 'userna5_smf123';The database name is composed of two parts. In our example userna5_smf123, the first part is the cpanel username (userna5), and the second part is the actual database name (smf123)
- Write down your database name in a safe place so will be able to remember it when you need to access it using the phpMyAdmin tool.
Thank you for your feedback!