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]  Access denied for user 'root'@'localhost' (using password: YES)
I have tried setting up a new user with new password and ensure full access privileges are set up on that database but I get the same error. I have tried setting up a separate host but when I try and run the Craft CMS set up with that I get this error:
Testing database credentials ... failed: SQLSTATE[HY000]  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.