Any knowledgeable Kodi MySQL users please?

Ok. Thanks. I already saw the option to export in sql , i am going to export and backup to my NAS the file just in case.
MySql keeps all the database, tables, querues , stored procedures etc.
I saw the video that you recommend me and i already test also this:
If you have a problem (wrong library) is just drop the my videos and my music new database tables, of course that will erase your entire library, it is important a backup.
With for example kodi 19 is just creating a new user kodi19, pass kodi19 and edit advancedsettings.xml .
With the users it is the same thing as the tables you can drop or create new users.
It have many options MySql but i dont want test many things because can put my db configuration and my library all wrong.

I tested in android and in windows and it works very well. I am watching a video in android for example and then i stop the video. I change to windows and is just resume that video.

Handy isn't it :)!!??
 
Hi friends.
My kodi sql NAS server is working great ☺
I found a tutorial for those who want to use a desktop PC as a kodi sql server.
https://www.google.com/amp/s/www.ho...media-across-your-entire-house-with-xbmc/amp/

I especially thanks to @ArcticWolf of all the help he gave me ☺

I now can say that it is easy but once you understand the whole process ☺

You're very welcome :).

Mine's also working great on a DS418 :). The NAS is perfect for running the MySQL server.

It is intimidating at first, there's no doubt about it!! Many of the available guides/tutorials are quite dated too which can cause further confusion if certain info is missing or incorrect. It is easier than it appears though. (If anything, I researched it all too much before setting mine up which saturated me with information I just didn't need ;).)

I'm really glad I took the time to set it all up, especially now that I'm running these additional beta devices in addition to my own, all of which use Kodi. The Kodi DB being centralised is much more convenient & it saves a lot of messing around.

Enjoy :).
 
You're very welcome :).

Mine's also working great on a DS418 :). The NAS is perfect for running the MySQL server.

It is intimidating at first, there's no doubt about it!! Many of the available guides/tutorials are quite dated too which can cause further confusion if certain info is missing or incorrect. It is easier than it appears though. (If anything, I researched it all too much before setting mine up which saturated me with information I just didn't need ;).)

I'm really glad I took the time to set it all up, especially now that I'm running these additional beta devices in addition to my own, all of which use Kodi. The Kodi DB being centralised is much more convenient & it saves a lot of messing around.

Enjoy :).
Yes it very usefull.

When kodi19 arrives i will keep my kodi18 database also (as a backup and if i need)
I have my advancedsettings.xml like this:
<advancedsettings>
<videodatabase>
<type>mysql</type>
<host>192.168.1.105</host>
<port>3307</port>
<user>kodi18</user>
<pass>kodi18</pass>
<name>kodi18_video</name>
</videodatabase>
<musicdatabase>
<type>mysql</type>
<host>192.168.1.105</host>
<port>3307</port>
<user>kodi18</user>
<pass>kodi18</pass>
<name>kodi18_music</name>
</musicdatabase>
<videolibrary>
<importwatchedstate>true</importwatchedstate>
<importresumepoint>true</importresumepoint>
</videolibrary>
</advancedsettings>

I also have phpmyadmin like this:
phpmyadmin.jpg

This way is easier to know what is what.

Here is kodi databases:
https://kodi.wiki/view/Databases
 
https://kodi.wiki/view/Databases

Kodi 18 and kodi 19 have the same databases (video and music).
I already tested :) and i already knew, i am going to stay also with kodi 18 databases (as a backup) in myMyAdmin (Maria server).
View attachment 761

They have the same DB numbering but you've created two separate databases, one 18 & the other 19. That may also change with Kodi 19 final(?????). We'll have to wait & see what they decide.

FYI, this is my advanced settings .XML file. (Syno NAS's create lots of thumbnail directories that begin to show up in your library if you use NFS which you can comment out. It also comments out your recycle bins etc. from being scanned to or showing up in your libraries too :).)

<advancedsettings>
<videodatabase>
<type>mysql</type>
<host>192.168.X.XX</host>
<port>3307</port>
<user>kodi18</user>
<pass>XXXX</pass>
<name>kodi_video</name>
</videodatabase>
<musicdatabase>
<type>mysql</type>
<host>192.168.X.XX</host>
<port>3307</port>
<user>kodi18</user>
<pass>XXXX</pass>
<name>kodi_music</name>
</musicdatabase>
<videolibrary>
<importwatchedstate>true</importwatchedstate>
<importresumepoint>true</importresumepoint>
</videolibrary>
<video>
<excludefromscan>
<regexp>\@eaDir</regexp>
<regexp>\@eadir</regexp>
<regexp>\#recycle</regexp>
</excludefromscan>
<excludefromlisting>
<regexp>\@eaDir</regexp>
<regexp>\@eadir</regexp>
</excludefromlisting>
<excludetvshowsfromscan>
<regexp>\@eaDir</regexp>
<regexp>\@eadir</regexp>
<regexp>\#recycle</regexp>
</excludetvshowsfromscan>
</video>
</advancedsettings>

:) :).
 
They have the same DB numbering but you've created two separate databases, one 18 & the other 19. That may also change with Kodi 19 final(?????). We'll have to wait & see what they decide.

FYI, this is my advanced settings .XML file. (Syno NAS's create lots of thumbnail directories that begin to show up in your library if you use NFS which you can comment out. It also comments out your recycle bins etc. from being scanned to or showing up in your libraries too :).)

<advancedsettings>
<videodatabase>
<type>mysql</type>
<host>192.168.X.XX</host>
<port>3307</port>
<user>kodi18</user>
<pass>XXXX</pass>
<name>kodi_video</name>
</videodatabase>
<musicdatabase>
<type>mysql</type>
<host>192.168.X.XX</host>
<port>3307</port>
<user>kodi18</user>
<pass>XXXX</pass>
<name>kodi_music</name>
</musicdatabase>
<videolibrary>
<importwatchedstate>true</importwatchedstate>
<importresumepoint>true</importresumepoint>
</videolibrary>
<video>
<excludefromscan>
<regexp>\@eaDir</regexp>
<regexp>\@eadir</regexp>
<regexp>\#recycle</regexp>
</excludefromscan>
<excludefromlisting>
<regexp>\@eaDir</regexp>
<regexp>\@eadir</regexp>
</excludefromlisting>
<excludetvshowsfromscan>
<regexp>\@eaDir</regexp>
<regexp>\@eadir</regexp>
<regexp>\#recycle</regexp>
</excludetvshowsfromscan>
</video>
</advancedsettings>

:):).

I made separate advancedsettings.xml , one for kodi18 and other for kodi19.
If i use one client with kodi18 i have to put advancedsettings.xml for kodi 18 and if i use kodi19 other .xml for kodi19.
Because i tested and i have two different advancedsettings.xml kodi created two MySql databases ☺.

Kodi 19 share the same databases numbers for video and music at least.

I am trying to find a way to have only one advancedsettings.xml (by modification in the code .xml or in the sql...) but i dont know if it will be possible, i am going to study more about...
Ideal was only have one sql database (and only one advancedsettings.xml) using kodi18, kodi19, kodi20 etc ☺

Databases versions , kodi mysql share are already in this wiki link.
I think they already decide the numbers in kodi 19.
We can see that if we test kodi19 with kodi NAS server (sql) , and i know kodi 19 is in development yet ☺

https://kodi.wiki/view/Databases
 
Last edited:
@ArcticWolf I advice to modify your advancedsettings.xml (this part of the code) like this:
<advancedsettings>
<videodatabase>
<type>mysql</type>
<host>192.168.X.XX</host>
<port>3307</port>
<user>kodi18</user>
<pass>XXXX</pass>
<name>kodi18_video</name>
</videodatabase>
<musicdatabase>
<type>mysql</type>
<host>192.168.X.XX</host>
<port>3307</port>
<user>kodi18</user>
<pass>XXXX</pass>
<name>kodi18_music</name>

When you create a new user you must check this:
- grant all previligies on wildcard name (username\_%)


Like that your phpMyAdmin will appear : :)

phpmyadmin.jpg
 
@ArcticWolf I advice to modify your advancedsettings.xml (this part of the code) like this:
<advancedsettings>
<videodatabase>
<type>mysql</type>
<host>192.168.X.XX</host>
<port>3307</port>
<user>kodi18</user>
<pass>XXXX</pass>
<name>kodi18_video</name>
</videodatabase>
<musicdatabase>
<type>mysql</type>
<host>192.168.X.XX</host>
<port>3307</port>
<user>kodi18</user>
<pass>XXXX</pass>
<name>kodi18_music</name>

When you create a new user you must check this:
- grant all previligies on wildcard name (username\_%)


Like that your phpMyAdmin will appear : :)

View attachment 805

They already are, I pasted in an old file by mistake :).

It's the exclusions that you may find useful;)!!
 
Last edited:
@ArcticWolf I advice to modify your advancedsettings.xml (this part of the code) like this:
<advancedsettings>
<videodatabase>
<type>mysql</type>
<host>192.168.X.XX</host>
<port>3307</port>
<user>kodi18</user>
<pass>XXXX</pass>
<name>kodi18_video</name>
</videodatabase>
<musicdatabase>
<type>mysql</type>
<host>192.168.X.XX</host>
<port>3307</port>
<user>kodi18</user>
<pass>XXXX</pass>
<name>kodi18_music</name>

When you create a new user you must check this:
- grant all previligies on wildcard name (username\_%)


Like that your phpMyAdmin will appear : :)

View attachment 805

I noticed that they have confirmed that the DB numbering will be retained for Kodi 19.

Ergo, if you actually just left your MySQL setup as per my old XML file & didn't number them Kodi 18 & Kodi 19 respectively, you would in fact be able to access the same database from both versions of Kodi :).
 
I noticed that they have confirmed that the DB numbering will be retained for Kodi 19.

Ergo, if you actually just left your MySQL setup as per my old XML file & didn't number them Kodi 18 & Kodi 19 respectively, you would in fact be able to access the same database from both versions of Kodi :).
Yes. I already tested what you said and it works (same video and music numbers at least) but i am thinking in the future, for example if they change numbers in kodi 20 ☺ ,if one day will be available of course ☺
 
Last edited:
A syncronization between kodi sql databases (kodi18 and kodi19 for example ) will be a good thing.
One more thing that i will be study ... ☺
 
Yes. I already tested what you said and it works (same video and music numbers at least) but i am thinking in the future, for example if they change numbers in kodi 20 ☺ ,if one day will be available of course ☺

Lol, that's 18 months to 2 years (or more) away ;).
 
Hi friends.
A quick update to this thread: :)

My mysql setup is running great.
I use kodi trakt add on in all my clients and also is working great.
https://trakt.tv/

For now i am using kodi 18.5 but my kodi 19 database is also ready.
When i change/migrate to kodi 19 is just :
Copy modified files (advancedsettings.xml. , etc) to my NAS and use trakt again :) (no need to export my library and import again) and with that all my libray stays the same as in kodi 18 version.

Another thing i learned :
With multiple NAS running, only one MySQL server (with Mariadb for example) is needed.
The rest of the shared folders (to work with more than one NAS) can be modified, added later.
 
Luckily, MySQL users are blessed with the future Kodi 19 Matrix sharing the same DB versions as Kodi 18 Leia, (the TV DB numbering will be different but the main categories remain the same) :). (By all accounts the Kodi dev team have been joined by some DB engineers/enthusiasts specifically looking to ensure forward DB compatibility into future Kodi versions :).)

No need to create seperate MySQL DB tables locally for MyVideos or MyMusic as they can essentially both read from each other :). Obviously, this couldn't be done between Kodi 17 & Kodi 18. (I was partially dreading the prospect of messing around with that part of MySQL but now I won't need to change a single thing when eventually upgrading from Leia to Matrix, bonus :).)

For the first time it will actually be possible to have, for example, Kodi 18 running on one local client whilst running Kodi 19 on another local client (if a user so requires it). Both can read from the same table. No need to mess around backing up/migrating Leia's DB's for use with Matrix :).

That was certainly pleasing when they announced it back in July '19. It's one (major) thing less to worry about looking forward & the switch "should" now be seamless, vs the potential for a lot of messing around as there was for the upgrade from 17 up to 18 :).
 
When i migrate to kodi 19 i will keep also kodi 18 sql database (as a backup and tests , it is useful if i want to test only kodi 18 sql databse (if i have some issue with kodi 19 for example...) .


I already tested and it works just fine:)
 
Back
Top