January 1, 0001

— type: post layout: post meta: {} title: Getting XBMC MythTV to work with Kubuntu Feisty Fawn (7.04) tags: - Gripes - Linux - MythTV - Tips and Tricks - XBMC Media Center published: true status: publish — After upgrading to Feisty Fawn (7.04) of Kubuntu I thought I had made all the necessary changes for my XBMC (XBox Media Center) MythTV frontend to talk to the Kubuntu server running the MythTV backend. Part of the Kubuntu upgrade altered the /etc/mysql/my.cnf configuration file for MySQL. This alteration required me to change the bind-address from localhost to the static IP addess of the server. I thought that this change would be sufficient but it turns out that it wasn’t. The MythTV frontend on my XBox failed to connect to the MySQL database on the MythTV backend for completely non-obvious reasons. If the error output in the MythTV frontend was better I probably would of identified the problem much more quickly. After some hours of looking closely at the MySQL configuration changes and various other network related settings in Kubuntu it looked like it might have something to do with the MySQL password handling. The old /etc/mysql/my.cnf had a old_passwords = 1 setting in it. The new configuration file did not. In addition, within the newly added configuration import directory /etc/mysql/conf.d there was an old_passwords.cnf file that explicitely set old_passwords = false. This gave me enough clues to see if the MythTV front end for the XBMC was in fact using the old password authentication mechanism (no longer supported by the server with this configuration). I found plenty of references to versions of PHP needing to use the old password authentication mechanism for MySQL and wondered if there was a similar issue with Python (the language used for the MythTV frontend on the XBMC). That information was enough to convince me to try and find out how to configure the server to continue to use the old password mechanism to see if that changed anything. Based on instructions in the MySQL reference documentation at Client does not support authentication protocol I first tried to get the MySQL daemon mysqld to start with the --old-passwords parameter so it worked like it would have prior to the upgrade. I couldn’t get this to work (the MySQL documentation is a bit sparse on how to set some of the configuration options) so I tried to set the password for the mythtv user using the OLD_PASSWORD() function instead of the PASSWORD() function. By a stroke of luck that actually worked. That’s where I’m leaving it too.

If it aint broke, don’t fix it.

So, at the moment the MySQL configuration is exactly the same way as it was after upgrading to Kubuntu Feisty Fawn (7.04) apart from the bind-address being set to the static IP address of the server. In addition, the MySQL password for the mythtv user has been reset using the OLD_PASSWORD() function.

  1. Login to MySQL as the root user
  2. mysql -u root -p
  3. SET PASSWORD for mythtv = OLD_PASSWORD('mythtv'); - where ‘mythtv’ is the password that is configured in the MythTV settings on the XBox.
  4. Test the settings in MythTV on the XBox
  5. Pat yourself on the back when it works and then go to bed…

This was pretty frustrating to have to deal with. If the error getting spat out of the MythTV frontend on XBMC was better this problem would have been much easier to find with a bit of searching on Google.

comments powered by Disqus