[mythtv-users] complete uninstall and reinstall on Ubuntu 20.04

Stephen Worthington stephen_agent at jsw.gen.nz
Tue Nov 2 11:19:25 UTC 2021


On Tue, 2 Nov 2021 06:45:52 -0400, you wrote:

>On Tue, Nov 2, 2021 at 6:13 AM James Abernathy <jfabernathy at gmail.com>
>wrote:
>
>>
>>
>> On Tue, Nov 2, 2021 at 5:55 AM Stephen Worthington <
>> stephen_agent at jsw.gen.nz> wrote:
>>
>>> On Tue, 2 Nov 2021 05:10:38 -0400, you wrote:
>>>
>>> >
>>> >On 11/1/21 9:28 PM, Stephen Worthington wrote:
>>> >> On Mon, 1 Nov 2021 15:33:19 -0400, you wrote:
>>> >>
>>> >>> I know that when I install MythTV on an Ubuntu 20.04 machine it does
>>> >>> everything for me in regards to database, Mythweb, passwords and
>>> config
>>> >>> files.  However using apt remove --purge doesn't remove everything.
>>> >>>
>>> >>> What else do I need to delete to make the mythtv-setup start all over
>>> >>> again? I've tried removing the /etc/mythtv directory and the
>>> >>> /home/$USER/.mythtv directory.  I must be missing something.
>>> >>>
>>> >>> Maybe the mariadb database is still there???
>>> >>>
>>> >>> Jim A
>>> >> You also need to remove /var/lib/mythtv, as there are changed files
>>> >> there (database backups at least).
>>> >>
>>> >> I would think that there would be user data in the MySQL/MariaDB
>>> >> system tables also, even if the mythconverg database is purged.  To
>>> >> delete that you would need to know what users were created for use
>>> >> with mythconverg.  So do this:
>>> >>
>>> >> sudo mysql
>>> >> SELECT User, Db, Host from mysql.db where Db='mythconverg';
>>> >
>>> >I just did this command on my production backend and I assume it would
>>> >be the same on my test system.
>>> >
>>> >mysql> SELECT User, Db, Host from mysql.db where Db='mythconverg';
>>> >+--------+-------------+------+
>>> >| User   | Db          | Host |
>>> >+--------+-------------+------+
>>> >| mythtv | mythconverg | %    |
>>> >+--------+-------------+------+
>>> >1 row in set (0.02 sec)
>>> >
>>> >Jim A
>>>
>>> Right, so you would need to do a "DROP USER 'mythtv'@'%';" command.
>>> That also deletes all the GRANTs for that user.
>>>
>>
>> So at this point the user is gone, what about mythconverg database itself?
>>
>> BTW,  just testing this on a test system.
>>
>> sudo apt remove --purge mythtv
>> removes /var/lib/mythtv
>> leaves /var/log/mythtv/*.log
>> leaves /etc/mythtv/*
>> leaves /home/jim/.mythtv
>> leaves /home/mythtv/.mythtv
>> leaves /home/mythtv/.xmltv
>>
>
>Even after dropping the user and the database, you can't successfully
>install mythtv using the ppa. I got some database errors about can't
>connect to the database the first time I run mythtv-setup.
>
>This is why I always reinstall the complete OS when I need a new mythtv
>setup.  If you had to copy old recordings and restore an old database then
>that could take long, but at least you'd be certain you had it right.
>
>Jim A

You probably need to delete /etc/config.xml at the same time as you
drop the user - they are created as a pair.

To see if the database is really gone, look at
/var/lib/mysql/mythconverg.  That directory and its contents should
not exist any more.  If it exists, what does it contain?


More information about the mythtv-users mailing list