MySQL Localhost Error - Localhost VS

Setting “localhost” in the mysql.yaml file may produce this error:

- instance #0 [ERROR]: OperationalError(2003, 'Can\'t connect to
MySQL server on \'localhost\' ((1045, u"Access denied for user
\'datadog\'@\'\' (using password: YES)"))')

The workaround is to grant permissions to datadog@ , rather than datadog@localhost

This problem is documented in this closed Datadog Agent issue and referenced in the MySQL documentation