Add 2 Readme files.
This commit is contained in:
11
README.cleanup_bruteforce_attempts
Normal file
11
README.cleanup_bruteforce_attempts
Normal file
@ -0,0 +1,11 @@
|
||||
# -----
|
||||
# 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));"
|
Reference in New Issue
Block a user