Mythtv-backend fails to start following recent update. Running the service start, gives an error, which relates to the database.
service mythtv-backend start Starting MythTV server: mythbackend
root@aaaaa:/home/neil# No UPnP backends found
Would you like to configure the database connection now? [no]
[console is not interactive, using default 'no']
Investigations on the Internet showed this to be a database access issue. However, no changes had been made to the database details, either to MySQL or to the MythTV database connection configuration.
My database connection is using root for the connection rather than mythtv. I tried re-doing the connection using:
dpkg-reconfigure mythtv-common
dpkg-reconfigure mythtv-database
I have found this to be the better order to run the two commands in.
Changing the database user didn’t resolve the issue, indeed it gave a failed connection error. Changing back to root I also had an error.
Failed to connect to database: Can't connect to MySQL server on '192.168.1.2' (111) at -e line 5, <> line 1.
Failed to connect to database: Access denied for user 'root'@'localhost' (using password: YES) at -e line 5, <> line 1.
Looking further on the Internet a suggestion was made that the mysql.txt, or config.xml files in the user directory should be deleted or sym-linked. I did the sym-link in both the login user directory and in the root directory /root/.mythtv. again without resolving the issue.
I had been looking in the log files for mythTV:
/var/log/mythtv/mythbackend.log. it was empty!
However, the log file /var/log/mythtv/mythlogserver.log gave a clue to the issue:
mythlogserver: mythlogserver[11725]: E CoreContext configuration.cpp:67 (Load) Error parsing: /var/lib/mythtv/.mythtv/config.xml at line: 1 column: 1
Checking the files in the user directories was almost correct. I navigated to the directory /var/lib/mythtv/.mythtv the two files were missing. So I added the sym-links:
/var/lib/mythtv/.mythtv# ln -s /etc/mythtv/mysql.txt mysql.txt
/var/lib/mythtv/.mythtv# ln -s /etc/mythtv/mconfig.xml config.xml
Restarted the MythTV backend service and all was well.
service mythtv-backend start
I also found that logging in as root and running the command mythfilldatabase I needed the two symlinks in the directory /root/.mythtv. permissions and owners were OK as root.


