[mythtv-users] Mythmusic fail

Stephen Worthington stephen_agent at jsw.gen.nz
Thu Nov 3 06:56:30 UTC 2022


On Wed, 2 Nov 2022 21:19:01 -0700, you wrote:

>On Tue, 1 Nov 2022 23:37:36 -0700, you wrote:
>
>>>For the past seven or eight times I have opened mythfrontend, it has asked
>>>me to upgrade the music database schema.  Each time I have allowed it to
>>>upgrade, but it apparently doesn't "take".
>
>>If you tell it to do the database upgrade, it should automatically do
>>a database backup first.  If your database is very large, that can
>>take a long time, and in the past, that has fooled people into
>>thinking that mythfrontend was not working and they have killed it and
>>restarted it, then said no to the upgrade question.  My database now
>>takes at least 20 minutes to do a backup (it is around 19 Gbytes).
>
>>To see what is happening, before you say yes to the upgrade question,
>>do this:
>
>>cd /var/log/mythtv
>>tail -f mythfrontend.log
>
>>You should see messages about the database backup and upgrade process.
>>Hopefully, there will be some clues as to why it does not work
>Thanks, Steve, much appreciated.
>
>Here are the pertinent lines from the log.  It looks like there is at least
>one table missing.  Unfortunately, I don't have database backups going far
>enough back (before the problem began) to have an idea as to what to repair.
>Any advice appreciated.
>
>Also - why does Mythweb depend on Mythmusic to work?  The browser can't
>connect - looks like more of a web-server (Apache2)  issue to me, but I'm
>not the Myth expert!
>
>Oct 30 16:04:46 vader mythfrontend.real: mythfrontend[7886]: E CoreContext
>dbcheckcommon.cpp:95 (performUpdateSeries) DB Error (Performing MythMusic
>database upgrade): #012Query was: ALTER TABLE music_albumart DEFAULT
>CHARACTER SET utf8; #012Error was: Driver error was [2/1146]:#012QMYSQL:
>Unable to execute query#012Database error was:#012Table
>'mythconverg.music_albumart' doesn't exist
>Oct 30 16:04:46 vader mythfrontend.real: mythfrontend[7886]: E CoreContext
>musicdbcheck.cpp:77 (UpgradeMusicDatabaseSchema) Database schema upgrade
>failed.
>Oct 30 16:04:46 vader mythfrontend.real: mythfrontend[7886]: E CoreContext
>main.cpp:885 (mythplugin_init) Couldn't upgrade music database schema,
>exiting.
>Oct 30 16:04:46 vader mythfrontend.real: mythfrontend[7886]: E CoreContext
>mythplugin.cpp:140 (init_plugin) Unable to initialize plugin 'mythmusic'.
>Oct 30 16:19:44 vader mythfrontend.real: mythfrontend[16429]: E CoreContext
>dbcheckcommon.cpp:95 (performUpdateSeries) DB Error (Performing MythMusic
>database upgrade): #012Query was: ALTER TABLE music_albumart DEFAULT
>CHARACTER SET utf8; #012Error was: Driver error was [2/1146]:#012QMYSQL:
>Unable to execute query#012Database error was:#012Table
>'mythconverg.music_albumart' doesn't exist
>Oct 30 16:19:44 vader mythfrontend.real: mythfrontend[16429]: E CoreContext
>musicdbcheck.cpp:77 (UpgradeMusicDatabaseSchema) Database schema upgrade
>failed.
>Oct 30 16:19:44 vader mythfrontend.real: mythfrontend[16429]: E CoreContext
>main.cpp:885 (mythplugin_init) Couldn't upgrade music database schema,
>exiting.
>Oct 30 16:19:44 vader mythfrontend.real: mythfrontend[16429]: E CoreContext
>mythplugin.cpp:140 (init_plugin) Unable to initialize plugin 'mythmusic'.
>Nov  1 23:22:01 vader mythfrontend.real: mythfrontend[1073105]: E
>CoreContext dbcheckcommon.cpp:95 (performUpdateSeries) DB Error (Performing
>MythMusic database upgrade): #012Query was: ALTER TABLE music_albumart
>DEFAULT CHARACTER SET utf8; #012Error was: Driver error was
>[2/1146]:#012QMYSQL: Unable to execute query#012Database error
>was:#012Table 'mythconverg.music_albumart' doesn't exist
>Nov  1 23:22:01 vader mythfrontend.real: mythfrontend[1073105]: E
>CoreContext musicdbcheck.cpp:77 (UpgradeMusicDatabaseSchema) Database
>schema upgrade failed.
>Nov  1 23:22:01 vader mythfrontend.real: mythfrontend[1073105]: E
>CoreContext main.cpp:885 (mythplugin_init) Couldn't upgrade music database
>schema, exiting.
>Nov  1 23:22:01 vader mythfrontend.real: mythfrontend[1073105]: E
>CoreContext mythplugin.cpp:140 (init_plugin) Unable to initialize plugin
>'mythmusic'.
>Nov  2 20:18:38 vader mythfrontend.real: mythfrontend[1416244]: E
>CoreContext main.cpp:885 (mythplugin_init) Couldn't upgrade music database
>schema, exiting.
>Nov  2 20:18:38 vader mythfrontend.real: mythfrontend[1416244]: E
>CoreContext mythplugin.cpp:140 (init_plugin) Unable to initialize plugin
>'mythmusic'.

It looks like you need to create the music_albumart table as it is in
Music Schema 1024.  Fortunately, I have an old virtual machine where
it is running Ubuntu 20.04 and MythTV v31, and has Music Schema 1024.
So I have made a backup copy of the empty music_albumart table and put
it on my web server:

http://www.jsw.gen.nz/mythtv/mysic_albumart.sql

To use this to create the music_albumart table, do this:

sudo mysql mythconverg
drop table if exists music_albumart
source /path/to/mysql_albumart.sql
quit

It is possible that once you create the music_albumart table, there
will be another bad or missing table found.  If so, just let me know
and I can repeat the process of dumping that table for you to use.


More information about the mythtv-users mailing list