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

@ -0,0 +1,3 @@
#!/bin/bash
SQLCONFFILE="./mysql.cnf" #set this to the path that contains the mysql.cnf file
mysql --defaults-file=$SQLCONFFILE -e 'SELECT table_name AS "Tables", round(((data_length + index_length) / 1024 / 1024), 2) "Size in MB" FROM information_schema.TABLES WHERE table_schema = "servatrice" ORDER BY (data_length + index_length) DESC;'