- Login to cPanel directly or through the Client Area
- Next find 'File Manager' and click this option
- Click 'public_html' or whichever directory is serving your website's files (such as a sub-domain).
- Click once on 'wp-config.php' and then 'View' in the menu bar
Doing this allows you to view the current database connection details and use the same credentials later if you wish. If you wanted to change the details in this file, simply edit the file insead however be sure that you're changes are intentional - as any changes made to this file will directly affect the site as seen to the public.