1
0
mirror of https://github.com/prometheus/mysqld_exporter.git synced 2026-10-23 08:48:59 +03:00
Files
mysqld_exporter/docker-compose.yml
Dean Chen 1c3c95db4e docs: restore local Docker Compose setup and clarify MySQL host grants
CONTRIBUTING.md told contributors to run docker-compose up, but the
compose file was removed years ago. Add a minimal docker-compose.yml and
document the real workflow (docker compose up -d, make, make test).

Also document that MySQL account host 'localhost' is for Unix sockets,
while the exporter default mysqld.address uses TCP to 127.0.0.1. Update
the grant examples accordingly so new setups work out of the box.

Fixes #680
Fixes #1000

Signed-off-by: Dean Chen <862469039@qq.com>
2026-07-21 00:05:53 +05:00

16 lines
396 B
YAML

# Local MySQL instance for development and manual testing.
# See CONTRIBUTING.md.
services:
mysql:
image: ${MYSQL_IMAGE:-mysql:8.0}
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
MYSQL_ROOT_HOST: "%"
ports:
- "127.0.0.1:3306:3306"
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "127.0.0.1"]
interval: 5s
timeout: 5s
retries: 20