waitmysql is a command that awaits MySQL server is alive.
It accepts some retry options.
So you can use this command instead of health check options.
go install github.com/aereal/waitmysql/cmd/waitmysql@latest
waitmysql -dsn '...'
See LICENSE file.