Any knowledgeable Kodi MySQL users please?

ArcticWolf

Trusted Helper
#21
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 :)!!??
 

Skynet

Administrator
#25

ArcticWolf

Trusted Helper
#26
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 :).
 

notrui2

Trusted Helper
#27
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
 
#29
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>

:) :).
 
#30
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:
#31
@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
 
#32
@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:
#33
@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 :).
 
#34
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:
Top