[mythtv-users] New IP address not used by Database

Stephen Worthington stephen_agent at jsw.gen.nz
Tue Jun 23 16:03:21 UTC 2020


On Tue, 23 Jun 2020 09:17:15 -0500, you wrote:

>
>Hi Stephen!
>
>
>> I am thinking that the simple way to fix this is to just directly
>> change the BackendServerAddr in the database.  And the mythsgu event
>> is no longer needed, so it can just be removed:
>>
>> sudo su
>> mysql
>> use mythconverg;
>> update settings set data='192.168.4.3' where value='BackendServerAddr'
>> and hostname='backend-3';
>> update settings set data='' where value='EventCmdAll' and
>> hostname='backend-3';
>> quit
>> systemctl restart mythtv-backend
>> exit
>
>I’m getting better at this stuff! Caught the line wrapping! The ‘and 
>hostname’ didn’t make sense, then looked and noticed the lack of the 
>semicolon after the line previous.
>
>
>
>Results:
>
>
>barry at Backend-3:~$ sudo su
>
>[sudo] password for barry:
>
>root at Backend-3:/home/barry# mysql
>
>Welcome to the MariaDB monitor. Commands end with ; or \g.
>
>Your MariaDB connection id is 617
>
>Server version: 10.1.44-MariaDB-0ubuntu0.18.04.1 Ubuntu 18.04
>
>
>Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
>
>
>Type 'help;' or '\h' for help. Type '\c' to clear the current input 
>statement.
>
>
>MariaDB [(none)]> use mythconverg;
>
>Reading table information for completion of table and column names
>
>You can turn off this feature to get a quicker startup with -A
>
>
>Database changed
>
>MariaDB [mythconverg]> update settings set data='192.168.4.3' where 
>value='BackendServerAddr' and hostname='backend-3';
>
>Query OK, 1 row affected (0.00 sec)
>
>Rows matched: 1 Changed: 1 Warnings: 0
>
>
>MariaDB [mythconverg]> update settings set data='' where 
>value='EventCmdAll' and hostname='backend-3';
>
>Query OK, 1 row affected (0.02 sec)
>
>Rows matched: 1 Changed: 1 Warnings: 0
>
>
>MariaDB [mythconverg]> quit
>
>Bye
>
>root at Backend-3:/home/barry# systemctl restart mythtv-backend
>
>root at Backend-3:/home/barry# exit
>
>exit
>
>barry at Backend-3:~$
>
>
>
>- - -
>
>
>Took maybe two minutes to get back to the prompt at the restart 
>mythtv-backend line.
>
>
>---
>
>And now the test! <drumroll...>
>
>
>YESSSS!!!!!! <Cartwheels, fireworks, marching bands> :)
>
>
>Test on a stand-alone device:
>
>Errors because (remote) FE still set to the old IP; correct that. .. 
>Thinks a while, connects!! (Figured it would, just wanted to verify.)
>
>
>Thanks to you and Bill and Hika (hope I didn’t miss any one) for helping 
>out!
>
>
>Should your correction/update command set be placed in a Wiki or some 
>sort of help page? This issue is bound to come up again.

As direct updates to the database are potentially disastrous, it is
better not to have people who do not fully understand them doing them
without supervision.  You really need to do the right queries to
understand what is in the database before you do any updates.  And
then be very careful how the update is done.  It is like that old
adage in the building trade - measure twice, cut once.  A runaway
update command is like a chainsaw that has its trigger stuck down and
has escaped its owners grip - flopping around destroying things at
random!

I think there is probably a way to get mythtv-setup to run in the
situation you had by using a command line override to give it the
right IP address setting.  But messing around with working that out
would have taken a while, so I gave you a customised database update
as a fix that we could do today to get you going again.  I wrote it
around 14:00, then went out for an hour or so and checked it again
when I got back before I sent the email.


More information about the mythtv-users mailing list