Update DB Scripts

Added backup / restore scripts.
Added table size script
Updated existing scripts to use variable location for mysql.cnf file
This commit is contained in:
woogerboy21 2015-07-11 11:22:54 -04:00
parent f733daf18a
commit 04c09647d7
8 changed files with 105 additions and 4 deletions

View file

@ -1,3 +1,4 @@
#!/bin/bash
# SCHEDULE WITH CRONTAB TO RUN ONCE A MONTH
mysql --defaults-file=./mysql.cnf -h localhost -e "delete from servatrice.cockatrice_sessions where start_time < DATE_SUB(now(), INTERVAL 1 MONTH)"
SQLCONFFILE="./mysql.cnf" #set this to the path that contains the mysql.cnf file
mysql --defaults-file=$SQLCONFFILE -h localhost -e "delete from servatrice.cockatrice_sessions where start_time < DATE_SUB(now(), INTERVAL 1 MONTH)"