12 lines
355 B
Plaintext
12 lines
355 B
Plaintext
# -----
|
|
# Cleanup table bruteforce_attempts
|
|
# -----
|
|
|
|
DATABASE_NAME='cloud_01'
|
|
MYSQL_CREDENTIAL_ARGS="--defaults-file=/usr/local/mysql/sys-maint.cnf"
|
|
|
|
# Delete entries older than 60 minutes
|
|
#
|
|
mysql $MYSQL_CREDENTIAL_ARGS $DATABASE_NAME -N -s \
|
|
-e "DELETE FROM bruteforce_attempts WHERE occurred < UNIX_TIMESTAMP( DATE_SUB( NOW(), INTERVAL 60 MINUTE));"
|