Guide For Mysql

Hi All

Just started with coreelec and all my other kodi PCs use my central mysql database.

Usually when setting up a new windows pc with Kodi I just copy across my advancedsettings thing.

How do I do that / set up mysql with coreelec?

When I plug in the coreelec USB into my pc the actual drive is unaccessible so I can’t just copy it across like I usually do.

So my main question is, is there a guide for setting up mysql on coreelec? If not:

  • is it just getting the advancedsettings file across into the USB?

  • if yes how do you do that? Is there a file explorer that works with networks?


You won’t be able to comfortably use the same DBs for all your platforms.
My best practices show that a platform differentiation works better, because paths to the content are different.
compare the content paths on all your Kodi setups,
and if it’s the same on all - then you may use one MySQL instance with Library DBs for all Win/Lin/Android devices.

P.S. Using entware, you can install MC (Midnight Commander) to CE device, for example.

Most of this just went over my head.

I have three windows kodi machines including the HTPC (with all the hdd). All using the same mysql database.


I’m using 3 devices (Shield and S912/S905X CoreELEC boxes) with the same database,and different paths.

CoreELEC boxes are accessing my NAS using systemd NFS mounts, whereas the Shield uses Kodi’s libnfs. You just have to use path substitution in advancedsettings.xml

My advancedsettings just has my IP address as the sources, the same way as I would if I manually created the sources in coreelec?

UNC paths are not natively supported by linux.
You must first mount the share, and then you’ll be able to do what you want.
LibreELEC has guides on how to configure mounts, you can also see a sample file in the ‘Configfiles’ folder on the CoreELEC device.

Yes, it’s just about sticking advancedsettings.xml in userdata.
If your paths to your media are valid then that’s it. If they’re not you can use pathsubs if you want to use an existing database.
As you’ve seen, you can’t access the coreelec storage partition in windows.
You can either:

  • stick your advancedsettings on the fat (flash) partition of your usb stick, boot coreelec, copy it to userdata in kodi’s file manager and restart
  • stick your advancedsettings in an accessible share on your pc, then copy it from there with the kodi filemanager and restart
  • stick the file on a usb stick, plug it into your coreelec device and …
  • boot coreelec, connect from windows in explorer (\192.168.1.xx in the address bar or whatever your actual coreelec ip is) and copy across.
    I can’t remember whether you have to mess with smb settings for the last option (probably).

They (UNC paths) won’t work in kodi on windows either, unless I’ve misunderstood.
I’m assuming by ‘IP addresses as the sources’ he means he’s using smb.
So for eg on my system this is valid (on kodi in windoze / CE / LE / android):
This isn’t (on any of them):

Where is userdata folder located from root. I can’t find it.

OK I’m fairly sure I have it in the right place, but nothing happened when I booted so I guess I’ll have to look more deeply into it.

Is there a detailed guide for mysql on coreelec?

Here is my current xml:


So I guess I’ll need to convert that IP somehow?

If I setup the sources directly (as in build a new library just for my coreelec box) it works like:


Do I just need to put smb:// in front in my xml?

Your advancedsettings looks fine - when you said you used IPs I assumed you meant in your video sources.
If you post a debug log it’ll show whether it’s in the right place / valid / being applied.

The IP sources work fine… Like this works if you add it as a source:


Sorry for the 20 questions but where would I find the log files in coreelec?


Well I just turned it on and it magically worked. It’s now using mysql library.

Odd cause I didnt change anything, but all sorted.

Another odd thing is the boot to nand isn’t working now so I can’t get back to android tv.

OK its weird, if I restart the box it loses all the library.

But if I then do the restart kodi thing it comes back with the mysql library all working.

Most likely kodi is starting before the connection to your mysql server is available. Try enabling the ‘wait for network’before starting kodi’ in coreelec settings.

1 Like

Cheers that should work.

Any idea on why restart to nand isn’t working, I can’t get back to Android TV. This doesn’t overly matter but would be good.

Sorry, no. Nothing you’ve done here should affect it. How are you trying to restart to nand?