MySQL Localhost Error - Localhost VS 127.0.0.1

Cette page n'est pas encore disponible en français, sa traduction est en cours.
Si vous avez des questions ou des retours sur notre projet de traduction actuel, n'hésitez pas à nous contacter.

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

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

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

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

PREVIEWING: may/op-log-enrichment