Présentation
Cette page inclut des scripts qui vous aident à déboguer et à utiliser MySQL.
Rechercher des activités d'écriture
#!/bin/bash
# Tail the binlog and look for insert / update / delete
# The goal is to help the user understand which writes are happening
MYSQL=$(which mysql)
MYSQLBINLOG=$(which mysqlbinlog)
DATE=$(which date)
if [[ -z "${MYSQL}" ]]
then
echo "ERROR: Could not find mysql shell"
exit 1
fi
if [[ -z "${MYSQLBINLOG}" ]]
then
echo "ERROR: Could not find mysqlbinlog utility"
exit 1
fi
if [[ -z "$1" ]]
then
echo "Usage: $0 [mysql connection parameters]"
exit 1
fi
last_log=$(