Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
  • 1
  • 26
  • 27
  • 28(current)
  • 29
  • 30
  • 41
HOW-TO:Share libraries using MySQL: Wiki Edition
(2016-02-27, 11:35)RJTPlomp Wrote: I'm trying to setup MySQL (mariaDB 5.5.44 on a QNAP-system) with Kodi v16 (Jarvis) running on a MacBook. I followed every step in the setup procedure.
1. Exported my library, so that .nfo files are created in all directories that are on my QNAP-system;
2. Created the Kodi user and password in MySQL;
3. Created the advancedsettings.xml and putting that in the right place on my MacBook;
4. Started Kodi on MacBook, and library was empty (which is ok);
5. Rescanned my sources, to import all .nfo files into my MySQL-database (it scans every source, like it always does!);
6. When I start using Kodi after scans finished no movies or tv-shows are showing;
7. I checked MySQL, MyVideo's table is there, and it holds all the data!;

But nothing is showing, can anyone help me resolve this issue?

Regards,

Roland

Whenever I create a new db, I need to re-set the content of each source. Maybe you don't need to, but it's something you can check easily.
CoreElec on a Tanix TX3 (s905x3). Onkyo NR-656. Canton Movie CD-1000. LG 55B6V.

If it ain't broke: break it, fix it, repeat
Reply
Hi Raytestrak,

I did rescan every source, is that what you mean by resetting? Not sure what you mean with 're-set', it maybe something I miss.

With rescanning I mean that I had to set the scraper for each source and after that it asks to rescan that source, which I did.

Thx for trying to help me with this.

Roland
Reply
(2016-02-27, 20:44)RJTPlomp Wrote: Hi Raytestrak,

I did rescan every source, is that what you mean by resetting? Not sure what you mean with 're-set', it maybe something I miss.

With rescanning I mean that I had to set the scraper for each source and after that it asks to rescan that source, which I did.

Thx for trying to help me with this.

Roland

Yes. That's what I meant. Are there any error messages in your log? Any firewall in place that could block your connection? Have you tried connecting on IP address?
CoreElec on a Tanix TX3 (s905x3). Onkyo NR-656. Canton Movie CD-1000. LG 55B6V.

If it ain't broke: break it, fix it, repeat
Reply
I have been looking for a log, but can't seem to find it. Can you tell me how I can access that? I'll let you know what it says.

I have Little Snitch installed on my MacBook, otherwise no firewalls, everything works on LAN-level. Don't see how my (router)firewall would prevent anything, or do I miss something here? I also believe nothing is really blowing access to MySQL cause database is automatically made by Kodi en all the data is in the tables when I look into them. I even dropped the databases (Music and Video), and they were rebuild on the next rescan of my media-sources.

You mean connecting on IP-adress of MySQL-server? Not sure what you mean here.
Reply
(2016-02-27, 21:55)RJTPlomp Wrote: I have been looking for a log, but can't seem to find it. Can you tell me how I can access that? I'll let you know what it says.

I have Little Snitch installed on my MacBook, otherwise no firewalls, everything works on LAN-level. Don't see how my (router)firewall would prevent anything, or do I miss something here? I also believe nothing is really blowing access to MySQL cause database is automatically made by Kodi en all the data is in the tables when I look into them. I even dropped the databases (Music and Video), and they were rebuild on the next rescan of my media-sources.

You mean connecting on IP-adress of MySQL-server? Not sure what you mean here.

UPDATE: SOLVED!

First I figured out where Kodi-logs are stored on OSX. Then started debuglogging by configuring the advancedsettings.xml file.

Next I started looking at the logging in detail. Found out there were ERRORS coming from tables missing in my MYVideos99 database. Started to search the forum for things concerning MyVideos99 and Kodi v16. And found this post:
http://forum.kodi.tv/showthread.php?tid=186325&page=2

It explains that there are issues with mariaDB. It shows which setting to temporarily turn on in MySQL (mariaDB), then let databases be created again (after dropping them first of course): and problem solved on next source-scan!!

So basically my issue was related to QNAP that left MySQL (cause now Oracle?) and turned to mariaDB (my version 5.5.44). But for anyone who stumbles into this: I hope this helps.

@Raytestrak: thanks for putting me on the path of logging.

Regards,

Roland
Reply
(2016-02-27, 21:55)RJTPlomp Wrote: I have been looking for a log, but can't seem to find it. Can you tell me how I can access that? I'll let you know what it says.

I have Little Snitch installed on my MacBook, otherwise no firewalls, everything works on LAN-level. Don't see how my (router)firewall would prevent anything, or do I miss something here? I also believe nothing is really blowing access to MySQL cause database is automatically made by Kodi en all the data is in the tables when I look into them. I even dropped the databases (Music and Video), and they were rebuild on the next rescan of my media-sources.

You mean connecting on IP-adress of MySQL-server? Not sure what you mean here.

My advancedsettings.xml contains this:

Code:
<videodatabase>
        <type>mysql</type>
        <host>192.168.1.1</host>
        <port>3306</port>
        <user>********</user>
        <pass>********</pass>
</videodatabase>

Your log should be here: /Users/<username>/Library/Logs/kodi.log.

My log isn't set to debug, so it contains very little info, but I do see it connects to 192.168.1.1 and that is uses MyMusic56 and MyVideos99.

Code:
Running database version MyMusic56
Running database version MyVideos99

Your issue sounds really strange. It seems your database gets filled, but on the other hand, Kodi doesn't see your database?
CoreElec on a Tanix TX3 (s905x3). Onkyo NR-656. Canton Movie CD-1000. LG 55B6V.

If it ain't broke: break it, fix it, repeat
Reply
Kodi warns that Jarvis needs an updated MariaDB version. However for me this runs on my Synology NAS. How do I know if it's good enough? They talk about version 10 but on synology this seems to be 5
Reply
This works the same MariaDB?
Reply
Hi,
I have configured a mysql database on my home server running Ubuntu Server. I have a Pi2 with nfs shares and other Windows clients with samba. I know it has been asked several times, but just can't figure it out, how do I configure this if two different type of shares are used? Now I have duplicate items, obviously only one playing, nfs on Pi2, smb on Windows.
Reply
(2016-06-06, 21:03)gurabli Wrote: Hi,
I have configured a mysql database on my home server running Ubuntu Server. I have a Pi2 with nfs shares and other Windows clients with samba. I know it has been asked several times, but just can't figure it out, how do I configure this if two different type of shares are used? Now I have duplicate items, obviously only one playing, nfs on Pi2, smb on Windows.

Configure your sources on Pi and Windows so they both use the same share, either both smb:// or both nfs://. If you use smb:// on Windows and nfs:// on Pi, then the shared database is of course going to treat each video as two different files resulting in duplicates.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
@gurabli

1) Pick one kodi client to establish sources for your library shouldn't matter which one but I would use the best one I had as far as processing power
2) Remove all library sources from all other devices
3) Make certain all other devices utilizing mysql for the library have the needed lines in advancedsettings.xml

It would be simplest to get it working properly on the client you choose in item 1 so either turn off or do not have the advancedsettings.xml file on any of them but that one until you get it working.

Also note you can not mix versions of kodi across your devices as the kodi database changes from version to version. i. e. kodi 16's db is different than kodi 15's
Reply
Hey Guys,

I somehow can't get Kodi to create a Database in Mysql.

I am running
Ubuntu 16.04 x64
Kodi 17 B3,
mysql Ver 15.1 Distrib 10.0.27-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

i did check the credentials and wether or not i could create a db successfully
(mysql -u kodi -h 127.0.0.1 -p) -> "Password: kodi" -> create database wow;
I also connected without -h and with the device's local ip instead of the localhost.

Since i'm running 16.04, i did follow the Autostart Guide on the Kodi wiki, which said if you need mysql include
Code:
if you need the MySQL DB backend, use this block instead of the previous
After = systemd-user-sessions.service network.target sound.target mysql.service
Wants = mysql.service
That's why i believe Mysql is already up and running when kodi tries to work its magic.

Code:
21:15:16 T:140097862826368  NOTICE: Running database version Addons26
21:15:16 T:140097862826368   DEBUG: Initialize, updating databases...
21:15:16 T:140097862826368  NOTICE: Running database version ViewModes6
21:15:16 T:140097862826368  NOTICE: Running database version Textures13
21:15:16 T:140097862826368   ERROR: Unable to open database: MyMusic60 [2003](Can't connect to MySQL server on '127.0.0.1' (111))
21:15:16 T:140097862826368   ERROR: Unable to open database: MyMusic59 [2003](Can't connect to MySQL server on '127.0.0.1' (111))
21:15:16 T:140097862826368   ERROR: Unable to open database: MyMusic58 [2003](Can't connect to MySQL server on '127.0.0.1' (111))
21:15:16 T:140097862826368   ERROR: Unable to open database: MyMusic57 [2003](Can't connect to MySQL server on '127.0.0.1' (111))
21:15:16 T:140097862826368   ERROR: Unable to open database: MyMusic56 [2003](Can't connect to MySQL server on '127.0.0.1' (111))
21:15:16 T:140097862826368   ERROR: Unable to open database: MyMusic55 [2003](Can't connect to MySQL server on '127.0.0.1' (111))
...
21:15:16 T:140097862826368   ERROR: Unable to create new database
21:15:16 T:140097862826368   ERROR: Unable to open database: MyVideos107 [2003](Can't connect to MySQL server on '127.0.0.1' (111))
21:15:16 T:140097862826368   ERROR: Unable to open database: MyVideos106 [2003](Can't connect to MySQL server on '127.0.0.1' (111))
21:15:16 T:140097862826368   ERROR: Unable to open database: MyVideos105 [2003](Can't connect to MySQL server on '127.0.0.1' (111))
21:15:16 T:140097862826368   ERROR: Unable to open database: MyVideos104 [2003](Can't connect to MySQL server on '127.0.0.1' (111))
21:15:16 T:140097862826368   ERROR: Unable to open database: MyVideos103 [2003](Can't connect to MySQL server on '127.0.0.1' (111))
...
21:15:16 T:140097862826368   ERROR: Unable to create new database

my advancedsettings.xml
Code:
<advancedsettings>
  <videodatabase>
    <type>mysql</type>
    <host>127.0.0.1</host>
    <port>3306</port>
    <user>kodi</user>
    <pass>kodi</pass>
  </videodatabase>
  <musicdatabase>
    <type>mysql</type>
    <host>127.0.0.1</host>
    <port>3306</port>
    <user>kodi</user>
    <pass>kodi</pass>
  </musicdatabase>
  <videolibrary>
    <importwatchedstate>true</importwatchedstate>
    <importresumepoint>true</importresumepoint>
  </videolibrary>
</advancedsettings>

Anyone 's got an idea?
Reply
I'm using Windows and kodi 16.1. In my advanced settings I use the actual IP of the box that msql is running on i. e.

<host>192.168.1.55</host>

Dunno if that would be what makes the difference or not, yeah I'm a n00b. Wink
Reply
I'm having issues getting mysql working.I did have this setup before using older kodi,currently running 16.1. I have followed the wiki and have checked everything.mysql setup on win7,firewall rule setup,even turned firewall off.Kodi log I get error 1130.so in the wiki it says to " Open the "MySQL Command Line Client" from the MySQL start menu
Enter the following commands:
Type in: CREATE USER 'kodi' IDENTIFIED BY 'kodi'; and press return
Type in: GRANT ALL ON *.* TO 'kodi'; and press return
Close out the command line tool

Note: If Kodi is unable to connect to the MySQL server, returning an error code [1130]:
If this occurs to you, try amending Step 2 above to read GRANT ALL ON *.* TO 'kodi'@'xxx.xxx.xxx.%'; where xxx.xxx.xxx is the first three quadrants of your home network's IP address (192.168.1 for example) and % as the last quadrant to allow addresses on the same subnet to connect
. So i'm not sure what to put in the last quadrant.The ip of the client?
Reply
Put the % there is the way I read it. So if you use 192.168.1.xxx on everything on your network then literally you would use 192.168.1.%

Did you remember to open port 3306 on your router for the IP of the computer hosting mysql?
Reply
  • 1
  • 26
  • 27
  • 28(current)
  • 29
  • 30
  • 41

Logout Mark Read Team Forum Stats Members Help
HOW-TO:Share libraries using MySQL: Wiki Edition2