diff options
Diffstat (limited to 'contrib/secbugstats/bin/repairtables.sh')
-rwxr-xr-x | contrib/secbugstats/bin/repairtables.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/contrib/secbugstats/bin/repairtables.sh b/contrib/secbugstats/bin/repairtables.sh new file mode 100755 index 000000000..147669dda --- /dev/null +++ b/contrib/secbugstats/bin/repairtables.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# You can manually run this script if you start getting MySQL errors about +# a table being corrupt. This will preserve the data in your tables. + +# scripts location (where does this config file live?) +SCRIPTS_DIR="$(dirname "$(readlink /proc/$$/fd/255)")" +source $SCRIPTS_DIR/settings.cfg + +echo "repair table BugHistory;" | mysql -h$DB_HOST $DB_NAME -u$DB_USER -p$DB_PASS +echo "repair table Bugs;" | mysql -h$DB_HOST $DB_NAME -u$DB_USER -p$DB_PASS +echo "repair table Details;" | mysql -h$DB_HOST $DB_NAME -u$DB_USER -p$DB_PASS +echo "repair table Stats;" | mysql -h$DB_HOST $DB_NAME -u$DB_USER -p$DB_PASS |