OSMC and remote MySQL-Database

I currently run 3 installations of Kodi 14.x on 3 different devices (Windows 7, Android and Raspberry Pi).
All of them are configured to use a remote mysql-database. Just installed OSMC Alpha 4 on my new Raspberry Pi 2, but I can’t connect to the mysql-database.

My advancedsettings.xml that works with my older installations:

Created a kodi.log and found this:

Is this a bug or am I doing something wrong?

Running with kinda the same settings as you, haven’t had a problem yet with any of the alpha builds.

Changed from dhcp to static ip (same as my old Raspberry), works now. Still no idea why it doesn’t work with the dhcp assigned ip, firewall on my server is configured to accept connections to port 3306 from local network ( and mysql user xbmc is accepted from ‘%’.

I have the same issue here - multiple Kodi 14.1 instances (Raspbmc, Windows, Ubuntu) can all connect to the MySQL library database, but the OSMC Alpha 4 on a Raspberry Pi 2 cannot - it logs the same error message as OP. Changing from DHCP to static IP works for some reason…

Isn’t this due to a known bug in the latest release of Kodi 14.1, which will hopefully be corrected shortly, with an updated release?

I am sure that the ‘experts’ on here will know far more about this sort of thing than I do, but I have noticed quite a few comments about it while browsing over the weekend.

EDIT: An update to OpenELEC (5.0.2) has just been released for the Raspberry Pi.

short question - in alpha 4 - is there e progressbar while scanning directories with central db? Is everything stored in the db?

I’ve used a MySQL database for two years or so…
Been using every alpha and beta available and have never run in troubles with it…

I think the progress bar may be missing in the OSMC skin, try changing to Confluence and see if it’s there

yes, in confluence it is there, seems that not all functions have been ported to osmc skin already, many thanks

I found one related bugtracker entry to my issue but it is closed (duplicate):

Temporary workaround:

hmm, think that does not regard the missing progress bar. moreover i think owner of osmc skin is not kodi?

You are right, but since I started this thread with a slightly different topic, my reply fits perfect into this thread.

where do you change from dhcp to static ip :slight_smile: ?

Changing the network settings inside kodi is not available with OSMC alpha 4, you have to use the terminal.

Exit kodi, press ESC before kodi starts again, login with osmc/osmc, do

sudo -s
cd /var/lib/connman
ls -la

there should be a directory like wifi_123456abcdef_1234567890abcdef_managed_psk, that is the “service” you want to change. Replace <service> below with actual name of service.

Now type

connmanctl config <service> --ipv4 manual <address> <netmask> <gateway>

Replace <address> with your desired ip, <netmask> with and gateway with ip of your router.

Now the nameserver:

connmanctl config <service> --nameservers <dns1> [<dns2>] [<dns3>]

<dns1> is either ip of your router, your ISP or any other dns (i.e. google:
You can configure up to 3 dns.



and kodi should start again.

You now have a static ip.


i would never have found that myself, thank you so much! :slight_smile:

MySQL working with other Kodi installs: Yup
MySQL database created by OSMC: (MyVideos90, a bit old now but) Yup
Wired and Fixed IP address work done: Yup
OSMC refusing to do anything else to the database: Yup

Well, the last bit is a ‘bit’ of a lie, it has added a file that I manually browsed to from the file list but still, this isn’t really the experience I would have hoped for :frowning:

Exactly what experience were you hoping for from Alpha software? It seems everyone else here has mysql working, I know I haven’t had any problems.
If you are seeking assistance, wouldn’t it make more sense to explain exactly what you are doing and what result you are seeing instead of posting some cryptic, sarcasm? Maybe include some debug logs?

Help us to help you…

If there was anything useful in the debug logs, I would have included them.

The process list on MySQL shows just idle and no attempt to do anything (even put query logging on to check.)

I’ll just go for the rather less sexy OpenElec until this matures a bit more. Still don’t regret donating though, I’ve got high hopes for this system.

MySQL and Kodi is still MySQL and Kodi.
I wouldn´t expect any difference no matter distro.

Whatever you think, always include debug logs. For example, as we have seen many times previously many users still use the MySQL name tag which is known to cause issues and is not recommended.

Personally I run MySQL and OSMC on several setups, I also use DHCP without issues though dedicated addresses from my router.

I know this is a “ancient” thread (This was the thread that Google pointed to) - but I just wanted to give my $0.2. (And thank DerDaumen for saving me for a lot of more googling for a solution)
I Just changed my router, but duplicated every “setting” from my previous setup, with internal DNS, same DHCP scope etc. But after that, OSMC was unable to use my external MySQL database (Both on hostname or IP)
Reinstalling OSMC had no effect - but setting static IP for my ethernet connection worked right away!

So my conclusion is that there is some option that is set via DHCP that renders external MySQL unusable on OSMC+RaspberryPI - on some routers…