myrep: PHP MySQL Repair Script | PurplePixie Home | Dave Online |
php myrep.php [options] -d database Command Options: -r --repair Do a repair if required or not checked -n --nocheck Don't check just do a repair (if -r is set) -w --warnings Repair tables with warnings (ignored if -n is set) -u --username X Login with username of X -p --password X Login with password of X -s --server X Connect to server X -d --database X Use database X (required)For each option a quick and long option can be used interchangeable i.e. -r and --repair are the same.
php myrep.php -u someuser -p secret -s somehost -d somedbWill connect to the MySQL server somehost as someuser:secret and check all the tables in somedb. No repairs will be attempted regardless of the outcome (as --repair is not set).
php myrep.php -w -r -d somedbWill connect to the default server (127.0.0.1) with default credentials (root with blank password), check the tables in somedb and repair them if an error or warnings are found.
php myrep.php -r -d somedbThe same as above but will only repair tables with errors (no repair just for warnings)
php myrep.php -n -r -d somedbRepair all tables in somedb without checking status first