[mythtv-users] backup script failing

Nick Morrott knowledgejunkie at gmail.com
Sat Apr 25 13:32:31 UTC 2020


On Sat, 25 Apr 2020 at 13:25, Tim Draper <veehexx at zoho.com> wrote:
>
> i've just upgraded from 30 to 31 and i noticed that while my cron job for the mythconverg_backup.pl has been running, only a small file is being created (2kb, rather than around 150mb) and has been failing since January.
>
> manually connecting with either root or mythtv db user via 'mysql -h sql -r USERNAME -p mythconverg' successfully connects and mythtv otherwise works correctly.
> i used phpmyadmin to backup my db before the v31 upgrade.
>
> unfortunately the problem remains after the upgrade which i hoped might recreate/fix what appears to be a DB issue, as part of the db schema update.
>
> ----
> $ ./mythconverg_backup.pl --verbose
> ....
> '/usr/bin/mysqldump' --defaults-extra-file='/tmp/lL5M1sscfa' --host='sql' --port='3306' --user='mythtv' --add-drop-table --add-locks --allow-keywords --complete-insert --extended-insert --lock-tables --no-create-db --quick --add-drop-table 'mythconverg' 2>&1 1>'/mnt/mythtv/dbbackups/mythconverg-1361-20200425130837.sql'
>
> mysqldump exited with status: 2
> mysqldump output:
> mysqldump: Couldn't execute 'SELECT COLUMN_NAME,                       JSON_EXTRACT(HISTOGRAM, '$."number-of-buckets-specified"')                FROM information_schema.COLUMN_STATISTICS                WHERE SCHEMA_NAME = 'mythconverg' AND TABLE_NAME = 'archiveitems';': Unknown table 'COLUMN_STATISTICS' in information_schema (1109)
> ----
>
> What could be the problem here, and more importantly whats the fix?

See https://serverfault.com/questions/912162/mysqldump-throws-unknown-table-column-statistics-in-information-schema-1109

>From that link:

This is due to a new flag that is enabled by default in mysqldump 8.
You can disable it by adding --column-statistics=0. The command will
be something like:

  mysqldump --column-statistics=0 --host=<server> --user=<user>
--password=<password>

To disable column statistics by default, you can add

[mysqldump]
column-statistics=0

to a MySQL config file, such as /etc/my.cnf or ~/.my.cnf.

Cheers,
Nick


More information about the mythtv-users mailing list