Kodi Community Forum

Full Version: One computer won't connect to MySQL
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I've been using XBMC across a few computers for a while now, and only found out the other day about the MySQL syncing features, so I've been trying to set this up using the guides on the wiki and howtogeek. Mostly, this has gone okay - one computer, an HP microserver on Windows 7 runs the MySQL server as well as hosting the media files and acting as an HTPC and this uses the MySQL just fine, and has done the initial scrape and set the tables up and everything. I've checked in the MySQL command line and this shows that the right database exists and has the right number of movies and TV shows in it.

Using the same advancedsettings.xml, I've tried to have the same library sync across 3 other computers - a MacBook (OS X), an old HTPC (Windows 7) in a bedroom and the PC I'm typing this on now (also Windows 7). The MacBook and upstairs HTPC work perfectly, the libraries, watched status, and videos resuming across different computers etc all worked with no extra setup other than the advancedsettings.xml file. The PC I'm typing this on, though, won't connect to the MySQL server. All that happens is I open XBMC, it hangs on the splash screen, and I have to ctrl+alt+del out of it (it works fine with advancedsettings.xml moved away again).

Reading the debug log, there's one error that jumps out at me:

Code:
21:53:52 T:3488   ERROR: Unable to open database: MyVideos60 [2003](Can't connect to MySQL server on '192.168.0.120' (10060))

The rest of the debug log: http://pastebin.com/xj8AqgCB

If I keep it running rather than quitting out, it keeps running down MyVideos60, 59, 58, etc to 1 then starts over.

This is my advancedsettings.xml:

Code:
<advancedsettings>
    <videodatabase>
        <type>mysql</type>
        <host>192.168.0.120</host>
        <port>3306</port>
        <user>xbmc</user>
        <pass>xbmc</pass>
    </videodatabase>
</advancedsettings>

A few things I've tried:
I've made sure the ports are open on the machine running MySQL and confirmed this is all working properly using canyouseeme.org
All the versions of XBMC are the same (aside from the OS X version, but they're all the most current stable versions on the downloads page as of today)
A ridiculous number of reinstalls with slightly different settings
Checked the permissions for the xbmc user in the MySQL command line which are fine

Now I've typed all this and spent days trying to fix it on my own and with the help of Google, I'm sure there is going to be a really obvious solution that I've managed to miss, but I think this is everything that could be vaguely useful.

Any ideas?

EDIT: Oh, I forgot to mention, on the PC that the XBMC-MySQL combo isn't working on, I've installed HeidiSQL which can connect to the MySQL database fine using the XBMC credentials, but XBMC still doesn't work with it, which is weird.
Sounds like you've done everything right. The only things I can think of are an outgoing firewall on the problematic PC or something like the router is doing something crazy like putting the PC on it's own internal network (I had a router that once separated the wireless connections from the wired connections. Both could connect to the internet, but they couldn't talk to each other).
Thanks for the reply.

Unless I'm misunderstanding (which is very possible), I don't think it could be that router craziness - all the PCs in the house connect to the computer running the MySQL server just fine for file sharing purposes as it holds all the TV and movies. All that doesn't seem to work is XBMC connecting to MySQL.

Since I posted the thread, I installed another copy of XBMC and ran it as portable so as not to mess with any settings I've got on my real install but still start over with totally fresh settings, but still the same error. I've also tried disabling all the firewalls on everything (aside from the router, where port 3306 is forwarded properly) and I'm still getting the same error. This is just especially annoying since it works fine through HeidiSQL.

Is there maybe some Windows setting I've enabled without realising that could be messing with this, or another program installed interfering? I can't think of anything else that would be too different on this computer compared to any other that would cause this problem.
Try telnet to 192.168.0.120, you should get a response back indicating the mysql version plus some garbage. If you dont get anything, I'd bet that Windows firewall is blocking the outbound connection
Hi, just tried your suggestion out. This is what I got:

Code:
J
5.5.28¦4V7M_wW☻ǧ"\+_~|uT%Xk6mysql_native_password

Connection to host lost.

Is this what I was supposed to get?