How to Find Database Login Credentials in Joomla’s configuration.php File

On this page
  1. Step 1: Connect to the Server via FTP
  2. Step 2: Locate the Joomla Installation Directory
  3. Step 3: Open the Configuration File
  4. Understanding the Values
  5. Using the Credentials in phpMyAdmin
  6. Security Recommendations
  7. Summary

Sometimes you may need to access your Joomla database through phpMyAdmin, for example to modify settings, restore data, or troubleshoot issues. If you do not remember the database credentials that were configured during installation, you can retrieve them from Joomla’s configuration file.

Important: Do not change the database password from the mybox Panel unless you also update the Joomla configuration file. Otherwise, your website will no longer be able to connect to the database.

Step 1: Connect to the Server via FTP

Connect to your hosting account using an FTP client such as:

  • FileZilla
  • WinSCP
  • Cyberduck

Use the FTP credentials assigned to your website.

Step 2: Locate the Joomla Installation Directory

Navigate to the directory where Joomla is installed.

In most cases, the website files are located in:

yourdomain.com/public_html

Inside this directory, locate the file:

configuration.php

Step 3: Open the Configuration File

Download the file or open it directly for editing using your FTP client.

Search for the following lines:

public $host = 'database_host';
public $user = 'database_user';
public $password = 'database_password';
public $db = 'database_name';

Understanding the Values

Parameter Description
$host Database server hostname
$user Database username
$password Database password
$db Database name

Example:

public $host = 'example.mysql.mybox.com';
public $user = 'example_user';
public $password = 'MySecurePassword123';
public $db = 'example_database';

These values can be used to log in to phpMyAdmin or connect to the database from another application.

Using the Credentials in phpMyAdmin

After obtaining the information from configuration.php:

  1. Open phpMyAdmin from the mybox Panel.
  2. Enter the database username.
  3. Enter the database password.
  4. Log in to access the database.

Security Recommendations

  • Never share the contents of the configuration.php file publicly.
  • Do not send database credentials via unsecured communication channels.
  • Keep a backup of the file before making any changes.
  • Avoid editing database settings unless necessary.

Summary

To find your Joomla database credentials, connect to your website via FTP and open the configuration.php file located in the Joomla installation directory. The database hostname, username, password, and database name are stored in the following configuration variables:

public $host = 'database_host';
public $user = 'database_user';
public $password = 'database_password';
public $db = 'database_name';

These credentials can then be used to access the database through phpMyAdmin or other database management tools.

Didn't find an answer?

Our support team is here for you 24/7 – write to us and we will help you sort it out.