I have followed the instructions from this site https://skillcrush.com/2015/04/14/install-wordpress-mac/ to install wordpress and MAMP on my MacBook. Everything worked out fine, but during the last step, the site is showing, Error establishing Database Connection. I am confused as to what caused this problem. Could it be because during the first time I turned in the MAMP server, I denied Firewall Access, I am not exactly sure what that was, but I accidentally denied it. Could it be the reason that it is showing this error? All the other solutions I googled are usually caused after the installation. Please help.
This error is usually caused by incorrect database credentials in your
wp-config.php file. Open that file and verify that the database server, name, user, and password are correct.