Bash
public
MySQL/MariaDB Ready
Share this script safely, inspect its metadata, and copy the exact command you need.
Ready to run
One-liner
curl -fsSL https://runny.sh/r/6W6D1MY48E1B | bash
Current version: 1.1 · Updated by Godmode · 2026-09-07 02:38:59.338
At a glance
Script metadata
Readable before runnable
Preview
#!/usr/bin/env bash
# MySQL / MariaDB readiness
# Read-only: mysqladmin ping. Does not modify schemas or data.
# Exit 0 if alive, 1 if mysqladmin is missing, 2 if the server does not reply.
# Hosted on Runny.sh. Review the script page before you run it.
set -u
note() { printf '%s\n' "$*"; }
note "=== MySQL/MariaDB readiness ==="
if ! command -v mysqladmin >/dev/null 2>&1; then
note "mysqladmin not found in PATH"
note "Result: WARNING"
exit 1
fi
note "Client: $(mysqladmin --version 2>/dev/null || printf unknown)"
note "Args: ${*:-<defaults>}"
note ""
out=$(mysqladmin "$@" ping 2>&1 || true)
out=${out#$'\a'}
note "$out"
case "$out" in
*[Aa]live*)
note " OK"
note "Result: HEALTHY"
exit 0
;;
*[Aa]ccess\ [Dd]enied*)
note " WARNING: server answered but authentication failed"
note "Result: WARNING"
exit 1
;;
*)
note " CRITICAL: mysqladmin ping failed"
note "Result: CRITICAL"
exit 2
;;
esac
Raw endpointhttps://runny.sh/r/6W6D1MY48E1B
See something unsafe?
Report this script
Tell us why it should come down. Anyone can also report a URL at /abuse.