Warning: MythTV wants to upgrade

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

Moderator: Forum Moderators

Post Reply
penguinjeff
Newcomer
Posts: 13
Joined: Wed Dec 17, 2014 5:40 pm
United States of America

Warning: MythTV wants to upgrade

Post by penguinjeff » Thu Dec 07, 2017 3:51 pm

When I start mythfrontend I get a warning

Code: Select all

Warning: MythTV wants to upgrade your database
for the Music schema, from 1023 to 1024

Database Host: localhost
Database Name: mythconverge

Exit
Upgrade
I select Upgrade then I get

Code: Select all

If your system becomes unstable, a database backup file called
mythconverg-1348-20171207152536.sql.gz
is located in /mythtv/db

There are also other clients using this database. They should be shut down first.

Exit
Upgrade
I select Upgrade but if I close and reopen mythfrontend
I am greeted by the same message.

This is a fresh install of mythtv.
I followed the instructions from https://www.mythtv.org/wiki/Installing_MythTV_on_Fedora
as closely as I could.
Notes: I disables selinux for now.
I am using firewalld and have it setup how I had it before it was working with mythtv in the past and the firewall rules look to be letting traffic through since I can connect a client mythtv app on my phone to it and can start watching channels from mythfrontend.

I am using an HDHomerun tuner

I followed the building of the database section and that seemed to work.
In the setup I setup my two tuners on my HDHomerun
I setup my directories under /mythtv/
I set a directory for each section there.

I would like to fix the database upgrade message.
Nothing else is running that should be accessing the mythbackend so I don't know what would be stopping mythfrontend from upgradding the database.

I reran with options "--loglevel debug --logpath ./" it should be accessable here
mythfrontend.20171207180000.19331.log
(49.94 KiB) Downloaded 3 times

User avatar
bill6502
Developer
Posts: 1114
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Warning: MythTV wants to upgrade

Post by bill6502 » Fri Dec 08, 2017 3:14 pm

Good log. "DROP INDEX station ON music_radios;" is failing,
because the index for station doesn't exist. The index was
added in Music schema 1020, and somehow was removed before
1024 (or, 1024 did its job, but didn't update the schema.)

If you're comfortable with mysql, you could verify that the
changes done in version 1024 have been done by looking
at this: https://code.mythtv.org/cgit/mythtv/tre ... k.cpp#n941

The approved solution is to restore the DB from the file (just a few lines
above the error you're getting.) It's possible that the error exists
in the backup too and you'd have to try earlier backups to find
one that works. See: https://www.mythtv.org/wiki/Database_Ba ... se_Restore

penguinjeff
Newcomer
Posts: 13
Joined: Wed Dec 17, 2014 5:40 pm
United States of America

Re: Warning: MythTV wants to upgrade

Post by penguinjeff » Fri Dec 08, 2017 4:09 pm

The issue is the database was started fresh that same day. I can install phpmyadmin and take a look. I am reasonably comfortable in mysql.
I tried upgrading fedora 26 to 27 and it was taking way too long. So I stopped the upgrade. Saved my configs and home directories including root and did a fresh install. The only configs I used from the backup were for networking so far(dhcpd, firewalld,interface configs and a few others) none of which should have affected a fresh install of mythtv. Could it be something in my user home directory which was restored or root home directory that was restored? Being that it is complaining about the database I'm thinking no. Maybe there are some mismatched files on the fedora 27 version of mythtv when I installed it. All I did was follow the instructions from the page I liked to.

I looked at /usr/share/doc/mythtv-docs/database/mc.sql
and it is nearly empty

Code: Select all

CREATE DATABASE IF NOT EXISTS mythconverg;
GRANT ALL ON mythconverg.* TO mythtv@localhost IDENTIFIED BY "mythtv";
FLUSH PRIVILEGES;
GRANT CREATE TEMPORARY TABLES ON mythconverg.* TO mythtv@localhost IDENTIFIED BY "mythtv";
FLUSH PRIVILEGES;
ALTER DATABASE mythconverg DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
I will open mysql and run "DROP DATABASE mythconverg;"
and retry the steps after mysql_secure_installation

here is what I have installed

Code: Select all

# dnf list mythtv*
Last metadata expiration check: 2:43:02 ago on Fri 08 Dec 2017 06:19:36 AM MST.
Installed Packages
mythtv.x86_64                      29.0-4.fc27         @rpmfusion-free-updates
mythtv-backend.x86_64              29.0-4.fc27         @rpmfusion-free-updates
mythtv-base-themes.x86_64          29.0-4.fc27         @rpmfusion-free-updates
mythtv-common.x86_64               29.0-4.fc27         @rpmfusion-free-updates
mythtv-docs.noarch                 29.0-4.fc27         @rpmfusion-free-updates
mythtv-frontend.x86_64             29.0-4.fc27         @rpmfusion-free-updates
mythtv-libs.x86_64                 29.0-4.fc27         @rpmfusion-free-updates
mythtv-setup.x86_64                29.0-4.fc27         @rpmfusion-free-updates
mythtv-status.noarch               0.10.4-7.fc27       @rpmfusion-free        
Available Packages
mythtv-devel.i686                  29.0-4.fc27         rpmfusion-free-updates 
mythtv-devel.x86_64                29.0-4.fc27         rpmfusion-free-updates 
mythtv-libs.i686                   29.0-4.fc27         rpmfusion-free-updates     
besides the Grant line in the doc

Code: Select all

/usr/bin/mysql -u root -p mythconverg
mysql> GRANT ALL ON mythconverg.* TO mythtv@"%" identified by  "mythtv";
mysql> flush privileges;
I'm also going to try

Code: Select all

/usr/bin/mysql -u root -p mythconverg
mysql> GRANT ALL ON mythconverg.* TO mythtv identified by  "mythtv";
mysql> flush privileges;
I'm thinking it might be something with sql authentication
Interesting this time when I ran setup it exited one time.
The next it asked to upgrade the db.
I exited out of setup and restarted it.
Also I didn't need to delete some cards. Like I did last time.

User avatar
bill6502
Developer
Posts: 1114
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Warning: MythTV wants to upgrade

Post by bill6502 » Sat Dec 09, 2017 12:07 am

If it were an authentication problem, I'd have expected a different error in
the log. You can access the DB with mysql -u mythtv -pmythtv mythconverg
, your password may be different (I don't speak phpmyadmin.) The contents
of mc.sql look correct.

Regarding you question about restoring your HOME, it's possible as
config.xml defines how to access the DB. But it's not my 1st guess
as to the root cause.

penguinjeff
Newcomer
Posts: 13
Joined: Wed Dec 17, 2014 5:40 pm
United States of America

Re: Warning: MythTV wants to upgrade

Post by penguinjeff » Sat Dec 09, 2017 2:01 am

Maybe it found a backup and loaded it when I did my reinstall? I have no idea. I had completely blown away the root partition.
It all works as expected now.

Post Reply