I know that a lot of other people have posted about this problem, but none of the other solutions were able to help me, which makes me suspect I've made some very specific stupid mistake in setting this up.
I have a live Magento site in 2.1.7 that I want to test in my developer environment on local hosting (I'm new to all this btw). I'm using MAMP 3.5 for local hosting which is running PHP 7.0.8, and MYSQL 5.6.
When I go on my localhost:8888 I get the error,
(Zend_Db_Adapter_Exception): SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES)
Here is my env.php data:
'host' => '127.0.0.1',
'dbname' => '(DATABASE NAME)',
'username' => 'root',
'password' => '******',
'active' => '1',
'port' => '3306',
In PHPMyAdmin, there is only one user on the database, there doesn't appear to be a wildcard user or anything like that. The user in PHPMyAdmin matches the one in my env.php file, and matches the one that MAMP said to use when setting all this up.
I've tried resetting privileges on all the relevant files and folders, flushing caches and resetting my server, but nothing seems to work. I can't help but feel I've missed something obvious.