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

James Abernathy jfabernathy at gmail.com
Tue Nov 2 10:45:52 UTC 2021


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20211102/5ba7eef3/attachment.htm>


More information about the mythtv-users mailing list