[mythtv-users] mysql errors
Jim Abernathy
jfabernathy at outlook.com
Tue Jan 16 12:59:32 UTC 2018
Now that I have daily database maintenance running, I've started paying
more attention to it. This morning after the cron jobs ran I got an
email that reported an error:
/etc/cron.daily/mythtv-backup:
mythconverg.program
error : Found key at page 2435072 that points to record outside datafile
error : Corrupt
So I check the syslog:
Jan 16 07:35:13 mythbuntu mythtv-backup[9307]: Debug: mythconverg cron.daily checking started.
Jan 16 07:35:14 mythbuntu mysqld: 180116 7:35:14 [ERROR] Got an error from thread_id=339, /build/mariadb-10.0-4Capoe/mariadb-10.0-10.0.31/storage/myisam/ha_myisam.cc:952
Jan 16 07:35:14 mythbuntu mysqld: 180116 7:35:14 [ERROR] MySQL thread id 339, OS thread handle 0x7fd55c082700, query id 253662 localhost root Checking table
Jan 16 07:35:14 mythbuntu mysqld: CHECK TABLE `program`
Jan 16 07:35:16 mythbuntu mythtv-backup[9309]: Debug: mythconverg cron.daily checking finished, backup starting.
Jan 16 07:35:16 mythbuntu mysqld: 180116 7:35:16 [ERROR] mysqld: Table './mythconverg/program' is marked as crashed and should be repaired
Jan 16 07:35:16 mythbuntu mysqld: 180116 7:35:16 [Warning] Checking table: './mythconverg/program'
Jan 16 07:35:16 mythbuntu mysqld: 180116 7:35:16 [Warning] Recovering table: './mythconverg/program'
Jan 16 07:35:17 mythbuntu mysqld: 180116 7:35:17 [Note] mysqld: Making backup of data file with extension '-180116073516.BAK'
Jan 16 07:35:20 mythbuntu mythtv-backup[9315]: mythconverg checked and backed up.
The key parts fo the mythtv-backup cron script is below:
set -e -u
DBNAME="mythconverg"
DEBIAN="--defaults-extra-file=/etc/mysql/debian.cnf"
# Debug:
/usr/bin/logger -p daemon.info -i -t${0##*/} "Debug: $DBNAME cron.daily checking started."
/usr/bin/mysqlcheck $DEBIAN -s $DBNAME
# Debug:
/usr/bin/logger -p daemon.info -i -t${0##*/} "Debug: $DBNAME cron.daily checking finished, backup starting."
/usr/bin/nice -n 2 /usr/share/mythtv/mythconverg_backup_jsw.pl --directory "/mnt/md1/samba/public/Backups/MythTV_db_backup/" --tempdir "/mnt/md1/tmp"
/usr/bin/logger -p daemon.info -i -t${0##*/} "$DBNAME checked and backed up."
The optimize_mythdb script runs next it reported no errors.
I assume that the optimize script fixed things. I manually reran the mythtv-backup script.
Since I got no errors in syslog after the manual run of mythtv-backup, are the orignal problems fixed??
Jim A
More information about the mythtv-users
mailing list