i am using MAMP on Mac OSX Yasmite 10.10.5 and getting this error.
SQLSTATE[HY000]  Access denied for user 'root'@'localhost' (using password: NO)
I have created database and name it magento.
Don't know where is the problem + there is no local.xml in magento/app/etc instead di.xml is available. Thanks in advance for any help.