[mythtv-users] backup script failing
Bill Meek
keemllib at gmail.com
Tue Apr 28 03:18:30 UTC 2020
On 4/25/20 8:32 AM, Nick Morrott wrote:
> 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
Interesting. On my fresh 20.04 (beta from last year) install, the database 'information_schema', has
the 'COLUMN_STATISTICS' table. I'm running MySQL 8.0.19.
--
Bill
More information about the mythtv-users
mailing list