Mark,
> Can anyone give the command line syntax for optimizing the entire db?
> thanks in advance.
mysqlcheck [OPTIONS] --databases DB1 [DB2 DB3...]
This program can be used to CHECK (-c,-m,-C), REPAIR (-r), ANALYZE (-a)
or OPTIMIZE (-o) tables. Some of the options (like -e or -q) can be
used at
I've used a simply shell script in the past.. run from cron to do it...
I just see someone posted a perl solution.. I've used a php one aswell..
#!/bin/sh
# DB OPTIMIZE SCRIPT - !! WARNING, DOES TABLE LOCKING DURING OPTIMIZES
user=root
pass=secret
host=10.1.1.1
db=mydb
[EMAIL PROTECTED]
mysql="/
("OPTIMIZE TABLE $table");
print "OK\n";
}
}
$dbh->disconnect();
-->-Original Message-
-->From: Mark Stringham [mailto:[EMAIL PROTECTED]
-->Sent: Tuesday, June 03, 2003 12:40 PM
-->To: [EMAIL PROTECTED]
-->Subject: optimize entire db
-->
Hi -
Can anyone give the command line syntax for optimizing the entire db?
thanks in advance.
MS