MySQL Collector

MySQL collector script

Each inspection starts with a bash collector that runs on the target DB host. The script is zero-dependency, writes plain text, and is safe to run in production.

Download

mysqlHealthCheckV3.0.sh · 60 KB

⬇ Download

Or with curl

curl -O https://dbaclaw.com/collector/mysql.sh
chmod +x mysql.sh

Requirements

Run it

./mysqlHealthCheckV3.0.sh \
  --user dba --password '***' \
  --host 127.0.0.1 --port 3306 \
  --output-dir ./out

# 每个实例跑一次。一主多从:在每个节点都执行一遍,
# 把所有 out/MySQLHealthCheck_*.txt 一起上传。

Output

输出文件名格式:

MySQLHealthCheck_<IP>_<YYYYMMDDHHMM>.txt

例:MySQLHealthCheck_10.0.31.2_202606051430.txt。脚本会把所有结果写到 --output-dir

Next

→ Upload the collector output to the MySQL workspace