Mythtv fails on update setting up mythtv and mythtv-database (29.1+fixes20180603.git1777cc4425-dmo1)

Situation: I was getting the following error message on updating the mythtv package from testing/main amd6.

Setting up mythtv-database (29.1+fixes20180603.git1777cc4425-dmo1) …
Failed to connect to database: Access denied for user
‘root’@’’ (using password: NO) at -e line 5, <> line 1.

dpkg: dependency problems prevent configuration of mythtv:
mythtv depends on mythtv-database (>= 29.1+fixes20180821.gite5fc66e822-dmo1); however:
Package mythtv-database is not configured yet.

dpkg: error processing package mythtv (–configure):
dependency problems – leaving unconfigured

Background: Updates started to fail in June 2018 and after several months of internet searching, I could not find a solution. My system isSystem:
Linux server 4.17.0-1-amd64 #1 SMP Debian 4.17.8-1 (2018-07-20) x86_64 GNU/Linux
Distributor ID: Debian
Description:    Debian GNU/Linux testing (buster)
Release:        testing
Codename:       buster

Assessment: Contacted the package maintainer at for help after internet searches yielded no results. I discovered that /etc/mythtv/config.xml is being overwritten with the updates and does not have the database username, database hostname, or database password to access the mythtv database.

Recommendation: Christian Marillat was kind enough to reply the next day with the suggestion to reconfigure the mythtv-common package. This will allow you to put in your database settings in the package before the software update. My update was failing because my mythtv database settings were not in the update. I entered the following command:

dpkg-reconfigure mythtv-common

You get the following three questions:

"Database to be used to hold MythTV data:"
[your database name that stores the mythtv data]
"Username used by MythTV use to access its database:"
[your username for the mythtv database]
"Password used by MythTV use to access its database:"
[your password for the mythtv database]
"On what host does the MySQL server reside:"
[Then hostname of the computer that stores the mythtv database]

apt upgrade; apt-get update

keywords: debian, mythtv,

Leave a Reply

Your email address will not be published. Required fields are marked *