wallabag / wallabag/docker

Tip: Stopping the "Access denied for user 'root'@'localhost' (using password: NO)" warnings in DB logs

Open
#311 0 comments 8 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
769
Forks
168
PR merge metrics
No merged PRs in 30d

Description

While troubleshooting an issue I was having, I noticed a number of Issues here have the "Access denied for user 'root'@'localhost' (using password: NO)" warning in the database logs in common, and thought I'd offer this tip.

It's caused by the healthcheck test command in the database section.

By default it's set to: `test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]`

That command accepts `--password=` as a parameter, so you can modify the test to:
```
test: ["CMD", "mariadb-admin" ,"ping", "-h", "localhost", "--password="]
```

You should never see another healthcheck-related access denied warning.

Edit (2023-06-26): MariaDB seems to have recently removed/replaced the `mysqladmin` command with `mariadb-admin`. The latter provides the same functionality.

Contributor guide

No contributing guide indexed for this repository

Research direction

Locate the database healthcheck in the Docker Compose configuration and start from the command using mysqladmin. Compare it with the MariaDB command and password argument described here, then verify that the resulting healthcheck no longer produces the access-denied warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker-compose, mariadb
Domain
database, devops
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.