[mythtvnz] New install setup - recording problem

Stephen Worthington stephen_agent at jsw.gen.nz
Wed Aug 3 03:45:52 BST 2016


On Wed, 03 Aug 2016 10:43:32 +1200, you wrote:

>On Wed, 03 Aug 2016 10:31:29 +1200, Nick Rout <nick.rout at gmail.com> wrote:
>
>> I must say that given your tuner numbering, I suspect you have deleted  
>> and added tuners a bit to get yourself in that state.
>>
>> I would delete all tuners (delete all capture cards on system) and add  
>> them back, the numbering will start at 1 again and produce a >much  
>> cleaner and better operating database. I have seen doing this  
>> recommended on mythtv-user mailing list, and it worked for me when >I  
>> had some similar difficulties.
>>
>> You will not have to retune as you just connect the new tuners to the  
>> existing video sources, which you shouldn't need to delete.
>>
>> On Wed, Aug 3, 2016 at 9:23 AM, Paulgir <paulgir at gmail.com> wrote:
>>>
>Actually,I didn't,I just restored the database backup from the 12.04  
>installation.The tuner numbering is as it is on 12.04 and 12.04 still  
>works fine.
>I'm deleted capture cards for the xth time and video sources and issued  
>the mysql commands below:
>> truncate table capturecard;
>> truncate table cardinput;
>> quit;
>
>and re-doing the setup.I don't expect it will rectify the problem.

That is not the right way to delete all tuners.  Sometimes there are
other things that need to be changed in the database when you delete
things that MythTV will do for you automatically.  Just truncating a
table will not make those things happen.  In this case, mythtv-setup
has a "Delete all tuners" option that is the right way to do it, and
will do any necessary cleanup.  There are two delete options, one for
all tuners on one host, and one for all tuners.  Use the one for all
tuners, as it does special cleanup to ensure that the tuner system is
ready to be recreated from scratch.  For example, it will also delete
all the channelscan_* table entries.

When having tuner problems like yours, it is recommended by the devs
to do a full delete like that before recreating all the tuners again.
I have never done it, so I do not know if you also lose all the
channel setup, but since you are just trying things on the 16.04 setup
and still have the 12.04 to fall back to, I think it is about time to
try that, if you have not done it already.

What I normally do when I am going to set up a new system and then
move my database onto it is to first start with an empty database and
do the initial setup (including tuners and channels, but not xmltvids
and EPG).  Then test the setup to make sure all the tuners work and so
on.  If you want to try that, then you can empty the database and
re-create it.  The way to do that is first shut down mythbackend
(systemctl stop mythtv-backend), then go into mysql and do these
commands:

drop database mythconverg;
source /usr/share/mythtv/sql/mc.sql

The source command reads a set of SQL commands from that file, which
looks like this:

CREATE DATABASE IF NOT EXISTS mythconverg;
GRANT ALL ON mythconverg.* TO mythtv at localhost IDENTIFIED BY "mythtv";
FLUSH PRIVILEGES;
GRANT CREATE TEMPORARY TABLES ON mythconverg.* TO mythtv at localhost
IDENTIFIED BY "mythtv";
FLUSH PRIVILEGES;
ALTER DATABASE mythconverg DEFAULT CHARACTER SET utf8 COLLATE
utf8_general_ci;

If you need external access to the database for non-local frontends,
then you need to also do the GRANT commands for that.  It might be an
idea to create a copy of the mc.sql file with the additional grant
commands, for later reference if you ever need to do this again.  I
have one, which also has a "DROP DATABASE IF EXISTS mythconverg;"
command at the start.

The rest of the database creation is done automatically by
mythtv-setup or mythbackend when they start up and see an empty
database.  So next, just run mythtv-setup and start configuring your
tuners.



More information about the mythtvnz mailing list