Knowledgebase

How to check and change the database configuration settings in Magento

If you want to check the database name, the database table prefix, the database username and password of the MySQL database in which your Magento is installed, or if you want to change these settings, you can do that with the help of a file called local.xml. If, for example, your Magento is installed directly in the public_html folder on your Magento hosting account, meaning the store is accessible at yourdomain.com, the path to the file on your account will be public_html/app/etc/local.xml.

You can download the file from the Files section of the Pixie control panel; to do this just highlight the file by clicking with the left mouse button next to its name and then use the Download button that appears in the black area on the right. You can also download the file with an FTP client (e.g. FileZilla). Then you can open and modify the file with a text editor such as Notepad or Wordpad.

In the local.xml file you'll find the following lines:

<host><![CDATA[localhost]]></host>
<username><![CDATA[database_username]]></username>
<password><![CDATA[database_password]]></password>
<dbname><![CDATA[database_name]]></dbname>

In those lines the text database_username, database_password, and database_name will be replaced with the actual name of the database user, the password for that user and the name of the database (together with the prefix). This is the information that you need to edit if you've moved your Magento to a different database. For more information on moving your Magento installation you may find useful the article on transferring Magento to a new location.

Was this answer helpful?

 Print this Article

Also Read