[mythtv-users] MythTV 30.0-dmo4/Debian 10.2 install-migration report.

Stephen Worthington stephen_agent at jsw.gen.nz
Sun Apr 12 01:27:10 UTC 2020


On Sat, 11 Apr 2020 15:08:49 -0400, you wrote:

>
>Some time ago I migrated MythTV from one machine to another.  These were
>the notes I took, with a few recent comments.
>
>Mythtv packages from deb-multimedia, Debian 10.2 completely up-to-date.
>
>Migration procedure:
>
>Copied the /video/mythtv directory from the old system (Debian 9.11/Myth
>0.28.2-dmo1+deb9u1) to the new one (Debian 10.2/MythTV 30.0-dmo4)
>
>On the old system:
>
>/usr/share/mythtv/mythconverg_backup.pl -verbose
>
>Moved the backed up DB to the new system (in ~/mythtv)
>
>/usr/share/mythtv/mythconverg_restore.pl --verbose --drop-database --create-database --directory=/home/afc/mythtv/ --filename mythconverg-1344-20200204152415.sql.gz
>
>This ended with:
>
>Successfully restored backup.
>Found DBSchemaVer: 1344.
>
>Ran mythtv-setup -w -geometry 1024x768
>
>It said "Warning: MythTV wants to upgrade your database, for the TV schema,
>from 1344 to 1350.
>Database Host: localhost
>Database Name: mythconverg
>
>Clicked on Upgrade.
>If the system becomes unstable, a backup is
>/video/mythtv/mythconverg-1344-20200204211214.sql.gz
>
>Ran mythtv-setup -w -geometry 1024x768 again.
>
>Security pin (required): 0000 (allows all frontends to connect)  (new setting)
>
>Had to select "master backend is on this host" and re-create the video cards
>and link input sources to the 2 tuners (Hauppauge wintv DualHD - moved to the
>new machine).
>
>On the old system I only had the default storage group.  Created
>
>Default storage group directory:	/video/mythtv
>Live TV storage group directory:	/video/mythtv/livetv
>DB backups storage group directory:	/video/mythtv/dbbackups
>Videos storage group directory:		/video/mythtv/videos
>Trailers storage group directory:	/video/mythtv/trailers
>Cover art storage group directory:	/video/mythtv/coverart
>Fan art storage group directory:	/video/mythtv/fanart
>Screen shots storage group directory:	/video/mythtv/screenshots
>Banners storage group directory:	/video/mythtv/banners
>Photographs storage group directory:	/video/mythtv/photos
>Music storage group directory:		/video/mythtv/music
>Music art storage group directory:	/video/mythtv/musicart
>
>At this point the backend wasn't starting so tried something I had to do on
>the old system every time Myth got upgraded:
>
># mysql -u root
>MariaDB [(none)]> grant all privileges on mythconverg.* to 'mythtv'@'localhost' identified by 'mythtv' with grant option;
>MariaDB [(none)]> grant all privileges on mythconverg.* to 'mythtv'@'%' identified by 'mythtv' with grant option;
>MariaDB [(none)]> flush privileges;
>MariaDB [(none)]> quit;
>
>It might not have been necessary.  I (regular user) am part of the mythtv
>group.  Since then I messed up mariadb in a big way.  I did something that
>prevented me from doing anything, not sure what I did but it had to do with
>root passwords.  The only solution I could find was to add this to
>/etc/mysql/mariadb.cnf
>
>[mysqld]
>skip-grant-tables
>
>So things are running again but I know this is not secure.
>
>I now can start the backend from a konsole by typing "mythbackend" but if I
>try to start it by:
>
>/etc/init.d/mythtv-backend start
>
>it says "ok" but it doesn't start.
>
>Trying this:
>
>service mythtv-backend start
>
>doesn't start it either.  No feedback at all.
>
>Since then I didn't do anything to try to understand why starting the backend
>as a service didn't work.  Then I had to reboot (which happens rarely) and the
>backend started just fine in the background.
>
>In some ways the upgrade/migration was easier than I expected, and I'm still
>kicking myself for messing up mariadb.  At least Myth is working.
>
>I hope this helps someone.
>
>Augustine

Debian moved to using systemd a long time ago now.  So you need to use
"systemctl" to run mythbackend.  I am not a Debian user, so I do not
know how its MythTV packages are set up, but if it is like Ubuntu,
then this command should show the status of mythbackend:

sudo systemctl status mythtv-backend

It used to be that the "service" command was mapped to the actual
command that ran services, but it is considered obsolete now and may
not be being maintained.

If you want to try to work out your MariaDB problems, I would suggest
that you try the new "show grants" command to see exactly what
privileges everyone has:

MariaDB [readerware]> show grants;
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id:    1750
Current database: readerware

+------------------------------------------------------------------------------------------------+
| Grants for root at localhost                                                                      |
+------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED VIA unix_socket WITH GRANT OPTION |
| GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION                                  |
+------------------------------------------------------------------------------------------------+
2 rows in set (0.01 sec)

MariaDB [readerware]> show grants for 'mythtv';
+-------------------------------------------------------------------------------------------------------+
| Grants for mythtv@%                                                                                   |
+-------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'mythtv'@'%' IDENTIFIED BY PASSWORD '*****************************************' |
| GRANT ALL PRIVILEGES ON `mythconverg`.* TO 'mythtv'@'%'                                               |
+-------------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)


More information about the mythtv-users mailing list