MYSQL Library Sharing
#1
Good evening or day (depending on where you live), community.

I've recently tried to set up a MySQL-Server to share my Kodi database with my upcoming new clients (I'm planning on 3 additions soon).
So I figured I'd get the server set up before my new clients arrive.

However I don't know if I'm too dumb, but I seem to be missing something quite basic. I cannot get Kodi to sync my database onto the MySQL-server.

Some details first:
----------------the_server----------------

MySQL-Server running on
Raspberry Pi 3 running Rasbian Jessie with PIXEL
Code:
IP: 192.168.0.13

Installed
mysql-server
mysql-client
php5-mysql
phpmyadmin
samba
and all prerequisites

Code:
made user 'kodi' with pass 'kodi' for both linux and mysql. Permissions root and ALL on linux and mysql.

----------------the_client----------------

Client01 running
Windows 7 x64 32GB RAM with Kodi
Code:
Kodi 17.0-RC4 Git: 20170119-53a5c83-dirty
I'm planning to upgrade to Kodi 17.0 as soon as it comes out. My other clients will also run Kodi 17.0
Code:
IP: 192.168.0.2
The Firewall has exceptions for TCP and UDP for port 3306 in both directions.

----------------my_media----------------

A WDMyCloudEX2 NAS with 8TB of storage
(I've tried running the MySQL server on that, but I ran into the same problems)
All files shared using samba
Code:
IP: 192.168.0.12

I've also tried moving my userdata files to the NAS for easy implementation
Code:
//192.168.0.12/kodi/

----------------my_advancedsettings.xml----------------

Code:
<advancedsettings>
  <videodatabase>
    <type>mysql</type>
    <host>192.168.0.13</host>
    <port>3306</port>
    <user>kodi</user>
    <pass>kodi</pass>
  </videodatabase>
  <musicdatabase>
    <type>mysql</type>
    <host>192.168.0.13</host>
    <port>3306</port>
    <user>kodi</user>
    <pass>kodi</pass>
  </musicdatabase>
  <videolibrary>
    <importwatchedstate>true</importwatchedstate>
    <importresumepoint>true</importresumepoint>
  </videolibrary>
  <pathsubstitution>
   <substitute>
    <from>special://profile/sources.xml</from>
    <to>SMB://192.168.0.12/kodi/userdata/sources.xml</to>
  </substitute>
  <substitute>
    <from>special://profile/mediasources.xml</from>
    <to>SMB://192.168.0.12/kodi/userdata/mediasources.xml</to>
  </substitute>
<substitute>
    <from>special://profile/favourites.xml</from>
    <to>SMB://192.168.0.12/kodi/userdata/favourites.xml</to>
  </substitute>
  </pathsubstitution>
</advancedsettings>

----------------the_my.cnf----------------

Code:
bind-address = 192.168.0.12 (I've also tried 0.0.0.0)
port = 3306
max_allowed_packet = 32M
!includedir /etc/mysql/conf.d/

----------------the_php.ini----------------

Code:
engine = On
output_buffering = 8192
zlib.output_compression = Off
max_execution_time = 60
max_input_time = 120
memory_limit = 256M
post_max_size = 32M
file_uploads = On
upload_max_filesize = 64M
max_file_uploads = 128
(and before you ask, yes I've tried importing my XML library into the MySQL database, to no avail)
Code:
default_socket_timeout = 90

----------------the_conclusion----------------

I've followed just about every tutorial out there, but there seems to be that tiny something I seem to be missing for this to work.
No matter what I've tried, my MySQL database stayed empty.

Please help me!
It is very appreciated!
Reply
#2
How about a debug log of you trying to connect to the server with one of your clients?
Reply
#3
Sorry, I needed time to work myself through the Log files first.
Also thanks for replying.

Le stupid me started working through the logs from bottom to top instead of from top to bottom, so it took me a while to find this line:

Code:
20:46:34.876 T:12712  NOTICE: No settings file to load (special://xbmc/system/advancedsettings.xml)
20:46:34.877 T:12712   ERROR: Error loading special://profile/advancedsettings.xml, Line 0
                                            Error document empty.

But why?
My advancedsettings.xml is in
Code:
%appdata%/Kodi/userdata/

I put it as instructed by the Wiki guide.

EDIT:
I added the advancedsettings.xml file in the path specified (and in the appdata/Kodi/system), so now I get this.

Code:
21:08:23.182 T:6856   ERROR: Error loading special://xbmc/system/advancedsettings.xml, Line 0
                                            Error document empty.
21:08:23.183 T:6856   ERROR: Error loading special://profile/advancedsettings.xml, Line 0
                                            Error document empty.
Reply
#4
Well that would be your first problem.

Stealing from http://forum.kodi.tv/showthread.php?tid=...pid1120518

"Either your permissions are wrong or its utf8 bom issue. Try to save it as ASCII."
Reply
#5
I've made a completely new advancedsettings.xml, so now I get this:

Code:
21:19:53.071 T:9860  NOTICE: Loaded settings file from special://profile/advancedsettings.xml
21:19:53.071 T:9860  NOTICE: Contents of special://profile/advancedsettings.xml are...
                                            <advancedsettings>
                                              <measurerefreshrate>true</measurerefreshrate>
                                            </advancedsettings>

That's definitely a step in the right direction.
Reply
#6
You, sir, are a fucking genius!

I applaud you wholeheartedly!

I knew it was something silly.
So it was UTF8! Curse you, Windows Notepad!!

It doesn't matter how correct my code is, if the file has the wrong format. I should've just made the file with Notepad++ to begin with : P
Reply
#7
[/solved] [/closed]
Reply
#8
One last thing: How do I upvote you (or your post)?
Reply
#9
Click the 'thank you' button under the post.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#10
Thanks. I didn't have that button before for some reason. It just appeared. Maybe I needed 10 posts before I could thank people?
Reply
#11
As long as you got it working, that's all that matters. Have fun!
Reply

Logout Mark Read Team Forum Stats Members Help
MYSQL Library Sharing0