[imp] problem with imp 2.2.1 and a mysql database
Chris Crowley
ccrowley@tulane.edu
Wed, 21 Feb 2001 16:03:20 -0600
>If anyone has any ideas on what I should do
Just restore from backup! (See Hindsight is 20/20 section--I learned this
the hard way, too.)
Try ISAMCHK'ing your file. This eventually worked for me. But be patient. I
remember it being a little tedious.
http://www.mysql.com/documentation/mysql/bychapter/manual_Maintenance.html#M
aintenance
Hindsight is 20/20 :
----------------------------------------------
# more nightly.sh
----------------------------------------------
#! /bin/ksh
#
#
# Must be run on hostname as root
#
#set -x
if [ "`hostname`" != "host.x.x.x" ]
then
echo "Must be run on host as root!"
exit
fi
if [ "`/usr/ucb/whoami`" != "root" ]
then
echo "Must be run as root!"
exit
fi
if [ -f /usr/local/mysql/var/horde/addr.bak ]
then
rm -f /usr/local/mysql/var/horde/addr.bak
fi
if [ -f /usr/local/mysql/var/horde/pref.bak ]
then
rm -f /usr/local/mysql/var/horde/pref.bak
fi
/usr/local/bin/mysql -u priv_user -p"o_4_u_2_no!" horde <
/usr/local/mysql/var/horde/nightly.sql
----------------------------------------------
# more nightly.sql
----------------------------------------------
select * into outfile '/usr/local/mysql/var/horde/addr.bak' from
horde.imp_addr;
select * into outfile '/usr/local/mysql/var/horde/pref.bak' from
horde.imp_pref;
delete from horde.active_sessions where horde.active_sessions.changed <
CURRENT_DATE();
----------------------------------------------