From the root of your Magento installation enter the app/etc/
folder and edit env.php
file which contains all the information related to your database configuration in the 'db'
node.
From here, you can edit various values related to your database configuration such as:
host
: your host address (usually localhost)dbname
: the name of the Magento website databaseusername
&password
: account information that has access todbname
After you’re done configuring, remember to save the file and clear your cache from Magento System > Tools > Cache Management > Flush Magento Cache.