Search
×
Log in or create an account
If you have an account with us, please log in.

You have no items in your shopping cart.

Frequently Asked Questions

How can we help you?

banner image

Magento 1 & Magento 2 database config file: Where to find it and how to edit

In view of backups, database edits, server hostname, username, password or database name alterations you need to work with MySQL.

In case you don’t know database credentials, but have FTP access you need to find Magento database access details.

To get Magento DB config file go to:

  •  /<Magento Install Dir>/app/etc/local.xml;
  • having accessed Magento database config file location, edit local.xml file using your number-one editor and find the next settings:

Magento db config 1

  • renew the needed values:

<host>

<username>

<password>

<dbname>

 

Once the changes are made, save the newly assigned values. To monitor all the backend activities, apply Magento access logs.

 

To get Magento 2 configuration file go to:

  • /<Magento Install Dir>/app/etc/env.php, edit env.php configuration file and look for the following settings for making the required changes:

Magento db config 2

  • check all the values you need: 

'host'

'dbname'

'username'

'password'

 

Don’t forget to save the updates.

More often than not there are cases when unwanted changes have already been implemented but nobody from the store admins knows what triggered them. To avoid the cases in the future, we offer the Magento 2 Admin Actions Log extension. Automatically track all logged actions, store logged data for a predefined period, get notifications on unauthorized login attempts and keep your store secure.

Rate the answer?

Total rating: 4.2

If you didn’t find the answer on your question, please, ask here:

Back to top