Details
-
Task
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Not a Bug
-
None
Description
1. Start a server from the latest docker image using a non-empty password:
docker run --name mariadb -d --rm -e MARIADB_ROOT_PASSWORD=nonempty mariadb:latest |
2. Attempt to run a simple health check on it using mariadb-ping:
docker exec -it mariadb mariadb-admin ping ; echo $?
|
mariadb-admin: connect to server at 'localhost' failed
|
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
|
0
|
Notice that authentication fails, but the exit code is 0 (success).
3. Do the same thing, but with a status check instead:
docker exec -it mariadb mariadb-admin status ; echo $? |
mariadb-admin: connect to server at 'localhost' failed |
error: 'Access denied for user 'root'@'localhost' (using password: NO)' |
1
|
Notice that the authentication fails, so the exit code is 1 (fail).
I believe both should fail with a non-zero code upon authentication failure. Without this, docker containers, or other setups that rely on "mysqladmin ping" may incorrectly succeed if the server is overwhelmed or otherwise having trouble succeeding with authentication requests.
Attachments
Issue Links
- is duplicated by
-
MDEV-31549 "mariadb-admin ping"
- Closed