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="/
You can use this script that I wrote. Also you can change OPTIMIZE TABLE
with ANAYLIZE TABLE
#!/usr/bin/perl -w
# If you use this give me CREDIT!! :) Dathan Vance Pattishall
#
use strict;
use DBI;
use lib '/site/lib';
my $USER = "";
my $PASSWD = "";
my ($host,$DB,$TABLE) = @ARGV;
die "must speci