Kodi Community Forum

Full Version: AFTVs hosting the MySQL for shared library
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Well I finally got around to testing this and it worked very simply, after days and days fighting trying to make it work hosting it on my NAS.

I wont call this a guide or Howto as I didnt do any screengrabs but just to outline the very simple steps.

First I have all my AFTVs and my NAS on fixed IPs. And I made sure my Kodi installs were all using IP address's in sources.

I downloaded the APK of ksweb server suite for sideloading from http://kslabs.ru/

I pushed it over to my primary AFTV box using adbfire to sideload.

First problem is that the app did not have its 7 day trial, said it had expired.. I am unsure of this was unique to me, or due to sideloading, or some other error.. I contacted the Dev who asked for the device id (its on settings tab) and he sent me a key.

Second problem is KSWEB is designed for touchscreen devices and doesnt have a highlighter to tell you where the cursor is. So some click counting and guessing is needed to navigate, but not that hard, just a little UI bug.

Once you have the serial (or I assume a trial period) the servers will start. This will also give you a web interface on <IP Address>:8000 however after much puzzling I discovered the web interface lacks some essential config needing access on the AFTV and click counting again.

Set up KSWEB to start on boot, and start minimized.

On the AFTV KSWEB interface, on the tools tab, you can install phpmyadmin (or adminer) and once you do so this will then add that tool on another port <IP address>:8001 :8002 etc.. Once this step is done everything else can be done from another machine and you no longer need to access with the AFTV.

Open PHPMyAdmin via the link/port it gave you.. Login root blank PW.. Security conscious should of course change that after logging in.

Once in PHPMyAdmin -> users tab, add user.. Choose username (kodi) pass (kodi) and leave it it for 'any host' access.. Database and user created.. Job now done.

If you want to test the MySQL is working.. This little windows tool seems to do an easy job http://mysql-system-tray-monitor.software.informer.com/ it wont of course work until you have an 'any host' user configured.

After that simply follow the steps as per the wiki, create a sample advancedsettings.xml as per http://kodi.wiki/view/MySQL/Setting_up_Kodi Just a simple case of the IP address of the AFTV running KSWEB and the user pass created above.

Worth mentioning at this point your going to need a rescan of the sources, so either have your NFO files created or export library (within Kodi) now if you want to keep it as it is currently.

Again use the ADBFire to push the advancedsettings.xml to the AFTV and and reboot it..

Open Kodi, which now has a blank library and rescan your sources..

Once you have your sources scanned into the database.. Push the same advancedsettings.xml out to each AFTV on your network with ADBFire again.

Voila..MySQL running on one primary android AFTV, with all the other nodes sharing the library.. Really was easy and so far not seeing any load issues with the box. I am assuming this will be the same for any android box which is set to not sleep.

MySQL hosting on AFTVs and other android boxes as simple as that.
Nice, thanks for the notes!
that is really helpful ... thanks
someone might want to add this to aftv wiki too
Assuming this works exactly the same (just easier if access to the play store) for any Android box.

Now MySQL shared libraries are as easy as that.. A few clicks..

Pretty happy TBH. Thats been bugging me for a while.
Sorry for a noob question, but when you say 'I made sure my Kodi installs were all using IP address's in sources' how do you do that? Are you adding the IP address of the MySQL server?

I've been trying to setup MySQL on a NAS Raspberry Pi all weekend and starting to give up, so hoping this may be an easier option.