The following command will optimize all databases in mysql (excpect those that don't support it due to their storage engine). mysqlcheck -Aao You can throw the –auto-repair flag in if you are brave.
The following command will optimize all databases in mysql (excpect those that don't support it due to their storage engine). mysqlcheck -Aao You can throw the –auto-repair flag in if you are brave.
If you need to change the TTLs on all domains in Plesk at once, you can massage the database with the following command: mysql> UPDATE `dns_zone` SET `ttl` = '300', `ttl_unit` = '60' WHERE `id` >1; Substitute the TTL values for what you need. Since the flat files are still used by named to provide [...]
Here is a handy little snippet for deleting all the tables in a database. Replace 'uname' and 'dbname' as required. mysql -u uname dbname -e "show tables" | grep -v Tables_in | grep -v "+" | gawk '{print "drop table " $1 ";"}' | mysql -u uname dbname
If your .FRM file gets hosed up, you'll need to repair it or your database(s) will be worthless. You'll still need to make sure you make regular backups of your databases so you can use them to rebuild the .FRM file. 1. Get last good backup of database (assumes the backup is an .sql formatted [...]