docker icon indicating copy to clipboard operation
docker copied to clipboard

MariaDB healthcheck changes in docker-compose sample

Open simondarwent opened this issue 1 year ago • 3 comments

With the recent update to MariaDB 11, the health check in the sample docker-compose leaves the container showing as unhealthy with an error output:

OCI runtime exec failed: exec failed: unable to start container process: exec: "mysqladmin": executable file not found in $PATH: unknown

Appears this is expected behaviour due to the removal of mysqladmin and suggests an alternative method to track container health using a healthcheck.sh script:

https://mariadb.org/mariadb-server-docker-official-images-healthcheck-without-mysqladmin/

simondarwent avatar Jun 24 '23 01:06 simondarwent

I have exactly the same issue from the previous update.

emijime avatar Jun 24 '23 08:06 emijime

This is related to the tip given in #311, except the mysqladmin command no longer works. Suspect MariaDB removed that recently, but mariadb-admin does work properly.

In Docker, my Wallabag+MariaDB+Redis stack stopped working with a recent update, but altering the healthcheck line in my docker-compose file to the following makes it work perfectly:

test: ["CMD", "mariadb-admin" ,"ping", "-h", "localhost", "--password=<value_of_MYSQL_ROOT_PASSWORD_variable>"]

couladin avatar Jun 26 '23 08:06 couladin

There is a solution in a #381

GAS85 avatar Apr 06 '24 19:04 GAS85