Kodi Community Forum
Solved Kodi & Mysql - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228)
+---- Thread: Solved Kodi & Mysql (/showthread.php?tid=342249)



Kodi & Mysql - yoda2018 - 2019-03-20

hi all ive managed to install mysql 5.6 on my server.

im having some trouble getting kodi to actually create and populate its database.

i used the GRANT ALL ON *.* TO '*****';
when i was setting up my mysql user


the mysql user can create and access databases so i'm relay confused

here is my AS.xml
Code:
<advancedsettings>
    <videodatabase>
        <type>mysql</type>
        <host>192.0.0.00</host>
         <port>3306</port>
        <user>******</user>
        <pass>******</pass>
    </videodatabase>

<musicdatabase>
    <type>mysql</type>
    <host>192.0.0.0</host>
    <port>3306</port>
    <user>y*******</user>
    <pass>*******</pass>
    </musicdatabase>
</advancedsettings>

ive striped out my internal ip and username and pass for security hence 192.0.0.0 and *******

when i do SHOW DATABASES in my sql i get this
Code:
mysql> SHOW DATABASES;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
+--------------------+
3 rows in set (0.00 sec)



RE: Kodi & Mysql - Klojum - 2019-03-20

If you want more info, enable debugging in the Kodi GUI, and also activate the Database component for additional SQL debugging.

Then restart Kodi, and provide us the debug log (wiki) via a pastebin website near you, and paste the URL to it here on the forum.

PS: Because showing an internal/local IP address is massively insecure..? Oo


RE: Kodi & Mysql - yoda2018 - 2019-03-20

(2019-03-20, 21:00)Klojum Wrote: If you want more info, enable debugging in the Kodi GUI, and also activate the Database component for additional SQL debugging.

Then restart Kodi, and provide us the debug log (wiki) via a pastebin website near you, and paste the URL to it here on the forum.

PS: Because showing an internal/local IP address is massively insecure..? Oo
ill get on it just out of curiosity where will the logs be stored on Ubuntu as its the only system i can mess with as my other device is been used

and yea i know it was tonight scrub ips out of posts lmao


RE: Kodi & Mysql - yoda2018 - 2019-03-20

here is the log file 

https://pastebin.com/raw/jKeHJm8A

i had a hard time getting it all into paste bin if you need more of the log ill find a way of splitting it and uploading to pastebin

i checked the location of my advanced settings xml i ran the ls command but i dont know why its quoted my advancedsettings.xml tho
Code:
yoda@yoda:~/.kodi/userdata$ ls
 addon_data               keymaps            peripheral_data   Savestates
'advancedsettings .xml'   library            playlists         sources.xml
 Database                 mediasources.xml   profiles.xml      Thumbnails
 guisettings.xml          passwords.xml      RssFeeds.xml
yoda@yoda:~/.kodi/userdata$ 



Kodi & Mysql - Klojum - 2019-03-21

The forum moderators have determined that banned addons (wiki) are present on your system. To receive assistance here, these banned items must be removed. If a clean log is not submitted within 3 days, then the relevant post(s) will be removed after this time.


Kodi & Mysql - yoda2018 - 2019-03-21

i removed them but they keep showing up in my log should i uninstall and reinstall kodi?


RE: Kodi & Mysql - Klojum - 2019-03-21

Some of the less legal add-ons are quite a PITA to remove. I'd simply start fully fresh, because who knows which part(s) of your Kodi setup have been compromised. Rename your .kodi folder and have Kodi create a new setup. You can copy all necessary config files to the new setup.

Also, store your advancedsettings.xml file without the space in the filename.


RE: Kodi & Mysql - yoda2018 - 2019-03-21

(2019-03-21, 00:40)Klojum Wrote: The forum moderators have determined that banned addons (wiki) are present on your system. To receive assistance here, these banned items must be removed. If a clean log is not submitted within 3 days, then the relevant post(s) will be removed after this time.
ive done a fresh install of kodi and im grabbing the log for the fresh install


Kodi & Mysql - yoda2018 - 2019-03-21

just noticed that space before .xml on here ill check the file as well


RE: Kodi & Mysql - yoda2018 - 2019-03-21

As requested ive taken steps to purge my system of **Banned Addons**

the steps ive taken to resolve the issue are as follows

i did a sudo apt-get purge kodi
Code:
yoda@yoda:~$ sudo apt-get purge kodi
[sudo] password for yoda: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  kodi-inputstream-adaptive kodi-inputstream-rtmp kodi-peripheral-joystick libcec4
  libcrossguid0 libfstrcmp0 libmicrohttpd12 libp8-platform2 libpcrecpp0v5
  libshairplay0 libtinyxml2.6.2v5 python-bluez python-cryptodome python-olefile
  python-pil python-simplejson
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED
  kodi* kodi-x11*
0 to upgrade, 0 to newly install, 2 to remove and 56 not to upgrade.
After this operation, 79.6 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 250799 files and directories currently installed.)
Removing kodi (2:18.1+git20190217.1232-final-0bionic) ...
Removing kodi-x11 (2:18.1+git20190217.1232-final-0bionic) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.2) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
(Reading database ... 248772 files and directories currently installed.)
Purging configuration files for kodi (2:18.1+git20190217.1232-final-0bionic) ...
yoda@yoda:~$

followed by manualy deleting the .kodi folder 

with my system now clean ill re-install kodi again
Code:
yoda@yoda:~$ sudo apt-get install kodi
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  kodi-x11
Suggested packages:
  kodi-pvr-mythtv kodi-pvr-vdr-vnsi kodi-pvr-tvheadend-hts kodi-pvr-dvbviewer
  kodi-pvr-iptvsimple kodi-audioencoder-vorbis kodi-audioencoder-flac
  kodi-audioencoder-lame
The following NEW packages will be installed
  kodi kodi-x11
0 to upgrade, 2 to newly install, 0 to remove and 56 not to upgrade.
Need to get 0 B/32.8 MB of archives.
After this operation, 79.6 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Selecting previously unselected package kodi-x11.
(Reading database ... 248773 files and directories currently installed.)
Preparing to unpack .../kodi-x11_2%3a18.1+git20190217.1232-final-0bionic_amd64.deb ...
Unpacking kodi-x11 (2:18.1+git20190217.1232-final-0bionic) ...
Selecting previously unselected package kodi.
Preparing to unpack .../kodi_2%3a18.1+git20190217.1232-final-0bionic_all.deb ...
Unpacking kodi (2:18.1+git20190217.1232-final-0bionic) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.2) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Setting up kodi-x11 (2:18.1+git20190217.1232-final-0bionic) ...
Setting up kodi (2:18.1+git20190217.1232-final-0bionic) ...
yoda@yoda:~$ 

here is the log file

https://pastebin.com/raw/KBecPZw1

it seems that there was an extra space in the advancedsettings.xml file that was throwing things out of whack top job for noticing it.

just to clear things up all i have to do is put the as.xml file on the other device and i wont need to re-scan my library as ive already done it successfully on the mysql server


RE: Kodi & Mysql - Klojum - 2019-03-21

(2019-03-20, 20:52)yoda2018 Wrote: when i do SHOW DATABASES in my sql i get this
It seems like both kodi video and music databases were not created. Perhaps you still have a database user rights problem for the user you created?
Double-check that, and don't forget to do "flush privileges" afterwards.


RE: Kodi & Mysql - yoda2018 - 2019-03-21

(2019-03-21, 08:31)Klojum Wrote:
(2019-03-20, 20:52)yoda2018 Wrote: when i do SHOW DATABASES in my sql i get this
It seems like both kodi video and music databases were not created. Perhaps you still have a database user rights problem for the user you created?
Double-check that, and don't forget to do "flush privileges" afterwards.
Hi Klojum ive nailed it, my problem seemed to be an incorrect filename.
Code:
advancedsettings .xml

changed to

advancedsettings.xml

amazing how a typo can completely gum up the works, cant believe it was right under my nose the entire time.

kodi now connects up to the mysql DB and has created the databases and it successfully populated them.

once again i would like to thank you all for taking the time to help me figure this out.


Kodi & Mysql - Klojum - 2019-03-21

Thread marked solved.