DB Upgrade fails on fresh install

Have a MythTV related problem? Ask for help from other MythTV users here.

Moderator: Forum Moderators

Post Reply
ramjet
Newcomer
Posts: 7
Joined: Fri May 07, 2021 9:07 pm
Great Britain

DB Upgrade fails on fresh install

Post by ramjet »

Hello,

I've just installed myth on a freshly built Xubuntu 20.04 LTS box after which I installed "mythtv" followed by "mythmusic" (last time I installed myth I'm sure mythmusic was installed by default ?). Obviously I did this via:

Code: Select all

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install mythtv
sudo apt-get install mythmusic
Following this whenever I try to run the front end it keeps wanting to upgrade the schema for the "music" plugin from 1015 to 1024. I therefore click the "Upgrade" button but it fails. When I run "mythfrontend" from a command line I can see there's a SQL syntax error message being output:

Code: Select all

2021-05-07 21:52:33.731347 N  Upgrading to MythMusic schema version 1016
2021-05-07 21:52:33.785167 E  DB Error (Performing database upgrade):
Query was: ALTER TABLE music_albumart  DEFAULT CHARACTER SET default,  MODIFY filename varchar(255) CHARACTER SET utf8 NOT NULL default '';
Error was: Driver error was [2/1064]:
QMYSQL: Unable to execute query
Database error was:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'default,  MODIFY filename varchar(255) CHARACTER SET utf8 NOT NULL default ''' at line 1

new version: 1016
2021-05-07 21:52:33.785194 E  Database schema upgrade failed.
2021-05-07 21:52:33.785527 E  Couldn't upgrade music database schema, exiting.
2021-05-07 21:52:33.785551 E  Unable to initialize plugin 'mythmusic'.
As this is a completely fresh install, onto a new blank HD, using only a Xubuntu live CD followed by "sudo apt-get" I've not tried to do much troubleshootig myself - it might be more useful for a developer to find what the actual bug is if I don't add to it by attempting to fix it myself :)

All advice gratefully received.
User avatar
bill6502
Developer
Posts: 2307
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: DB Upgrade fails on fresh install

Post by bill6502 »

I think it's a bug, but not at that line. It may be a case where the log is missing the
whole SQL. MySQL v10 changes some defaults.

Can you run it again with --verbose database:debug switch?
ramjet
Newcomer
Posts: 7
Joined: Fri May 07, 2021 9:07 pm
Great Britain

Re: DB Upgrade fails on fresh install

Post by ramjet »

Cheers for the speedy reply ! I piped the output into a text file which I've attached as a zip. Command was

Code: Select all

mythfrontend --verbose database:debug
n.b. Something worth mentioning is that this box currently doesn't have any capture cards/remote etc. configured. I'm building it to give to a friend and initially it's going to be used purely as a juke box. So all I need to currently get working is for it to be able to rip her CDs, play back the mp3s, and to be controlled via mythweb as it'll be running networked but without a monitor.

Monitor, capture cards etc. will be added at a later date - and passwords and firewall will be hardened after it's working :)

Thanks again for the swift reply !
Attachments
2021-05-07 Mythfrontend (3).txt.tar.gz
(30.29 KiB) Downloaded 66 times
User avatar
bill6502
Developer
Posts: 2307
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: DB Upgrade fails on fresh install

Post by bill6502 »

OK, that helps, but no new SQL. It looks like one I fixed last year.
Do you have the mythbuntu PPA active so that you can get the
updates?

Code: Select all

sudo add-apt-repository ppa:mythbuntu/31
sudo apt update
sudo apt dist-upgrade
ramjet
Newcomer
Posts: 7
Joined: Fri May 07, 2021 9:07 pm
Great Britain

Re: DB Upgrade fails on fresh install

Post by ramjet »

Not currently. This is a complete "stock install" from a Xubuntu Live CD then "apt get" to isntall Myth. The only other repository I've added was the Intel "focal graphics" repository which I aded this morning. I've been trying to get video to play through Myth and it also fails - VLC plays the video just fine :)

I've got to go out shortly so I'll try adding the myth respository, doing an update, and get back with the results in about an hour.
ramjet
Newcomer
Posts: 7
Joined: Fri May 07, 2021 9:07 pm
Great Britain

Re: DB Upgrade fails on fresh install

Post by ramjet »

Thankyou that worked a treat. The database has been upgraded, mythmusic now starts, the "Listen to music" item is showing in the menu, and audio playback works.

However I'm not able to play any video using the myth player. No matter what I choose in mythfront end it fails to play the sample video, or the single video I've put in "/var/lib/mythtv/videos". As I mentioned previously this video plays fine in VLC (and on another box running Myth) so this must be another myth config issue.

The motherboard on this box is an MSI H61I-E35 (MS-7677) which has integrated Intel graphics so I've added the intel graphics repository, installed drivers and selected "VDAPPI Normal" in myth front end - I've also tried all other video profiles but none work. I used the following commands to add the Intel repository and istall drivers:

Code: Select all

Commands taken from: https://dgpu-docs.intel.com/installation-guides/ubuntu/ubuntu-focal.html

sudo apt-get install -y gpg-agent wget
wget -qO - https://repositories.intel.com/graphics/intel-graphics.key |
  sudo apt-key add -
sudo apt-add-repository \
  'deb [arch=amd64] https://repositories.intel.com/graphics/ubuntu focal main'
 
sudo apt-get update

sudo apt-get install \
  intel-opencl-icd \
  intel-level-zero-gpu level-zero \
  intel-media-va-driver-non-free libmfx1
Any further advice on this would be gratefully received !
Post Reply