Developers often have to do some work related to database, such as backups, database edits, etc. But usually the clients don’t even know what is MySQL database and where to get the database access details, they usually give just FTP or hosting control panel access.
Even if you have access to hosting cPanel, there might be a number of databases and you might need just one database related to a certain website/application. For example: magento.
So, let’s assume we have FTP access and we don’t know the database credentials, but we need to perform a database backup. Where do we find the database access details?
Go to ‘/app/etc/’ directory and open the file ‘local.xml’.
<initStatements><![CDATA[SET NAMES utf8]]></initStatements>
Here you can see all the data u need:
see host, username, password and the dbname nodes in the xml structure.