[mythtv-users] MySQL update problems with mythconverg

Bob Sully rcs at malibyte.net
Sun Jul 23 19:44:02 UTC 2017


Stephen:

Mysqlcheck didn't fix the problem. Four tables still missing.

The oldest database backup I have is from 17 May.  Same issue, so this 
has been an issue apparently since after the last mysql-server update 
(or the previous ones didn't run the check).

I could create a VM with MythTV...might have to do it on a faster 
machine and copy the files over...this one will run a VM, but 
s...l...o...w...l...y.  Not sure why it would be so slow, it's a 
Core-2-Quad @ 2.8GHz with 8GB of RAM.  Maybe it's because the VM I tried 
running was Windows.  Another Linux instance might be better.  If all 
else fails, that's what I will try.

I haven't used the weather feature for some time but do remember 
setting it up in the past (distinctly remember giving it location data 
and which screens to display).  Clicking on it in mythfrontend doesn't 
do anything now, and in Setup, there are no available options under 
Info->Weather, of course.  Would re-installing mythweather generate the 
tables in mythconverg?  Right now I can't install anything because of 
dpkg's issues with mysql-server - but I'm just wondering whether it 
could solve the weather tables issue.

Regarding record_tmp - I have had *zero* problems scheduling and 
recording programs.

Not sure what to do about the remaining error message either.

Thanks -
Bob



On Sat, 22 Jul 2017 23:18:36 -0700, you wrote:

>Hi all -
>
>Ran apt-get update/upgrade today on my 16.04/0.28-fixes system. MySQL
>server was one of several packages which were to be updated. However,
>it went through a check on the mysql and mythconverg databases and
>barfed on missing tables in mythconverg. MythTV has been running fine
>as-is. Is there a good/easy way to clean this up, as of course dpkg
>won't install/update anything else until I do so. Running dpkg
>--configure -a and apt-get -f install didn't work, of course, as it's 
> an
>issue with the database. I suppose I could monkey with the 
> mysql-server
>entry in /var/lib/dpkg/info and manually tell it to exit without an
>error code, but I'd rather do it correctly.
>
>Ideas? Thanks very much, in advance.


>
>The sys schema is already up to date (version 1.5.1).
>Checking databases.
>Failed to run query "ALTER DATABASE `#mysql50#mythconverg.bak` UPGRADE
>DATA DIRECTORY NAME"
>Error: Incorrect database name '#mysql50#mythconverg.bak'
>#mysql50#mythconverg.bak FAILED

>mythconverg.record_tmp
>Error : Table 'mythconverg.record_tmp' doesn't exist
>status : Operation failed
>mythconverg.weatherdatalayout
>Error : Table 'mythconverg.weatherdatalayout' doesn't exist
>status : Operation failed
>mythconverg.weatherscreens
>Error : Table 'mythconverg.weatherscreens' doesn't exist
>status : Operation failed
>mythconverg.weathersourcesettings
>Error : Table 'mythconverg.weathersourcesettings' doesn't exist
>status : Operation failed
>
>Repairing tables
>mythconverg.record_tmp
>Error : Table 'mythconverg.record_tmp' doesn't exist
>status : Operation failed
>mythconverg.weatherdatalayout
>Error : Table 'mythconverg.weatherdatalayout' doesn't exist
>status : Operation failed
>mythconverg.weatherscreens
>Error : Table 'mythconverg.weatherscreens' doesn't exist
>status : Operation failed
>mythconverg.weathersourcesettings
>Error : Table 'mythconverg.weathersourcesettings' doesn't exist
>status : Operation failed
>Error occurred: Error during call to mysql_check.
>mysql_upgrade failed with exit status 4


I would recommend manually running mysqlcheck to see if it can fix
things, before trying anything more risky. And before doing anything,
see if you can make a backup of the database. If the usual
mythconverg_backup.pl script backup does not work, then shut down
mysql and copy all the files in /var/lib/mysql to another location.
Then if anything bad happens while trying to repair things, you can
just copy them back again before trying something different.

Presuming that you are not using the weather feature, those weather
tables do not matter and can be re-recreated. But having a problem
with record_tmp should be making the scheduler fail, so I do not know
why you have not seen problems before this.

My understanding is that the contents of record_tmp are not kept long
term and are just re-created every time the scheduler runs. But I do
not know that for sure, so before re-creating record_tmp, it would be
good if someone could confirm that.

Re-creating the missing tables is relatively straightforward, as long
as you have a database backup with those tables still in it. What you
need to do is find a text editor that can handle huge files, and
uncompress a backup and edit the .sql file down to just parts that
create the missing tables. Then run that from a mysql prompt using
the source command:

sudo mysql -u $DBUserName -p$DBPassword -h $DBHostName mythconverg
source ./recreate_missing_tables.sql

If you can not find a backup with those tables still in it, then you
may need to install a copy of MythTV on a virtual machine and get it
to create the mythconverg database, then back that up and use that
backup to edit. Make sure you update the MythTV version to the same
as the one you are running so that the database schema will match.

This error message I have never met, so I have no idea what it is
about:

Failed to run query "ALTER DATABASE `#mysql50#mythconverg.bak` UPGRADE
DATA DIRECTORY NAME"
Error: Incorrect database name '#mysql50#mythconverg.bak'
_______________________________________________
mythtv-users mailing list
mythtv-users at mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org


-- 
_____________________________
Bob


More information about the mythtv-users mailing list