Skip to main content
1 of 2
cannon303
  • 331
  • 1
  • 8

Error with Craft CMS set up and composer: failed: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES)

Hi I am trying to set up craft CMS with composer. I am using MAMP on a mac and I just cannot get it to connect. I get this error even though I know the password is correct.

failed: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES)

I have tried setting up a new user with new password but when I try and run the Craft CMS set up I get this error:

Testing database credentials ... failed: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known

Any help with this would be much appreciated as I've wrestled with it all day now. Thanks.

cannon303
  • 331
  • 1
  • 8