[ANSWER] Joomla – How to recover SQL database password

If you’ve ever needed to restore or migrate your Joomla website installation you’ve no doubt struggled to find the username and password for the SQL database connection.

The good news is it’s easy to access information as long as you have access to the files on the server, whether it be through FTP access or the cPanel.

Instructions: How to Recover SQL Database Password

In this example we will be using the cPanel, however you may choose to use what ever access you have to the Joomla system files.

  1. Log into the cPanel console for your hosted website (this process will differ depending on where you website is hosted – please discuss with your host if you are unsure)
  2. Open the ‘File Manager’
  3. Joomla-RecoverSQLPW1
  4. If prompted select ‘Web Root’ then ‘Go’
  5. Joomla-RecoverSQLPW2
  6. Locate the ‘configurations.php’ file
  7. Right-click on the file and select ‘View’
  8. Joomla-RecoverSQLPW3
  9. The password is started as var $password = between the symbols.
  10. For example
  11. var $password = ‘yourpasswordhere‘;
  12. You can also get the database user account and database name from this file, they’re stored as
  13. var $user and var $db