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
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 database
password: account information that has access to
After you’re done configuring, remember to save the file and clear your cache from Magento System > Tools > Cache Management > Flush Magento Cache.