Getting XBMC MythTV to work with Kubuntu Feisty Fawn (7.04)
, , , , April 30th, 2007After 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.
- Login to MySQL as the root user
mysql -u root -pSET PASSWORD for mythtv = OLD_PASSWORD('mythtv');- where ‘mythtv’ is the password that is configured in the MythTV settings on the XBox.- Test the settings in MythTV on the XBox
- 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.
April 30th, 2007 at 10:45 pm
I could kiss, you.. but i wont… ive been looking for a solution.. i was kinda guessing it was password related.. but was doing my head in..
I owe you a beer or something.
May 2nd, 2007 at 6:00 pm
Thanks a ton for posting this. I was pulling my hair out trying to figure out why the database wouldn’t connect. I too thought all you had to do was alter /etc/mysql/my.cnf.
Anyway, I too, owe you a beer. Thank you much.
As expected, the same fix works with Ubuntu server. Might help some other poor soul find this page via Google.
.::. Moto .::.
September 20th, 2007 at 8:59 pm
This process also works when the latest Kubuntu update for MythTV 0.20.2 is installed. No idea why the upgrade would want to change the MySQL database for the mythtv user, but it was broke after the upgrade and worked after running that SQL script again.
January 18th, 2008 at 7:30 pm
thanks! you’re a lifesaver… well, a linux-box-saver, at least, since it was just mintes away from taking a flying leap from a 2nd-story window. It shall live to record another day.
January 29th, 2008 at 9:29 am
*g* thaaankkyooou
it would’ve taken an eternity to figure that all out… now have xbmcmythtv and mythtv 0.20.2 working together wonderfully :o)
January 30th, 2008 at 2:46 am
any idea why the above doesn’t work when using Ubuntu 7.10 and mythtv-svn (0.20.99)? Test settings says ok, but just gives a generic cannot connect to backend error when starting the script.
January 31st, 2008 at 10:57 pm
@Christoper
Does the XBMC MythTV plugin support that version of the MythTV backend? I know that there are different versions of the protocol that the MythTV front end clients use to communicate with the MythTV backend. Perhaps the protocol has changed in that version of the MythTV backend.
July 9th, 2008 at 7:20 pm
Mythtv 0.21 is using protocol 40, so at the moment you can only connect to Backend with the new default.py from the cvs Ropositories.
cvs -d:pserver:anonymous@xbmcmythtv.cvs.sourceforge.net:/cvsroot/xbmcmythtv login
cvs -z3 -d:pserver:anonymous@xbmcmythtv.cvs.sourceforge.net:/cvsroot/xbmcmythtv co -P xbmcmythtv