Kodi Community Forum
Kodi & Mysql on a Qnap TS-451 NAS - 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: Kodi & Mysql on a Qnap TS-451 NAS (/showthread.php?tid=361455)

Pages: 1 2


Kodi & Mysql on a Qnap TS-451 NAS - yiannispap - 2021-03-16

I keep all my movie collection in a Qnap TS-451 NAS. I have several TV boxes running Kodi 18 in my home network. I also have an sql server running in my NAS Sharing the movie library. Recently I set up Kodi 18.9 inside the NAS (since it is a media player with HDMI output) I wrote the advanced settings script iside it, but no result!!! Kodi refuses to see the sql database inside the same device!!!! Any suggestions? Thank you in advance!!!


RE: Kodi & Mysql on a Qnap TS-451 NAS - Klojum - 2021-03-16

I've split off your post from the old solved thread. It didn't seem appropriate to continue there.

(2021-03-16, 17:28)yiannispap Wrote: Kodi refuses to see the sql database inside the same device!!!!

If Kodi runs locally on the NAS, the 127.0.0.1 IP address should work. Other than that: enable debugging in Kodi, restart Kodi, and provide the debug log (wiki) so we can perhaps see what's going on.


RE: Kodi & Mysql on a Qnap TS-451 NAS - yiannispap - 2021-03-16

Thank you for the quick response! I have just tried the 127.0.0.1 with no luck, I have enabled debugging but I cannot find the log! On the upper left appears the message LOG:/opt/kodi18/.kodi/Temp/kodi.log!!! Any idea where this file might be? (I've changed the IP adress as you suggested but I left the port in the script!)


RE: Kodi & Mysql on a Qnap TS-451 NAS - black_eagle - 2021-03-16

Well, the log is located where the message tells you Wink  Perhaps it will be easier for you to use the log uploader addon (https://kodi.wiki/view/Add-on:Kodi_Logfile_Uploader).  If that doesn't work for you you can move the log to somewhere else on your nas using Kodi so that you can access it from outside Kodi.  See https://kodi.wiki/view/Log_file/File_manager_access for instructions.


RE: Kodi & Mysql on a Qnap TS-451 NAS - yiannispap - 2021-03-16

I thank you both very much! I have manage to extract the log, you can find it here https://paste.kodi.tv/okemiyewaz


RE: Kodi & Mysql on a Qnap TS-451 NAS - Klojum - 2021-03-16

2021-03-16 22:09:58.653 T:139683744970496 ERROR: Unable to open database: MyVideos116 [1045](Access denied for user 'kodi'@'TS-451' (using password: YES))

MySQL error 1045:

Access Denied for user .. (using password: YES). This may happen if your MySQL database user was not granted the necessary rights to access the database. Or if you provided a wrong password.

You entered an LAN IP address in the advancedsettings.xml, but in the kodi log it says TS-451.
What happens if you enter 127.0.0.1 instead of the 192.168 address?


RE: Kodi & Mysql on a Qnap TS-451 NAS - yiannispap - 2021-03-16

My password is wright, is the same for all my kodies <kodi> Here is the log with the 127.0.0.1 IP http://paste.kodi.tv/uguheyokan


RE: Kodi & Mysql on a Qnap TS-451 NAS - Klojum - 2021-03-17

(2021-03-16, 23:17)yiannispap Wrote: Here is the log with the 127.0.0.1 IP

Access denied for user 'kodi'@' localhost' (using password: YES)
That's looks a bit more logical. Apparently the NAS does some internal IP/hostname translation.

Perhaps you can enable skip-name-resolve in the my.ini / my.cnf file (whichever filename is relevant for your QNap NAS).
Also disable any bind addresses in that configuration file.
Image

Then there are the database user privileges. Did you follow the instructions here? https://kodi.wiki/view/MySQL/Setting_up_MySQL
Doublecheck what the values for the database user 'kodi' are? All but one should be set to 'yes'.
What is the value for the 'Host' field of the user 'kodi' in the 'mysql' database system table?


RE: Kodi & Mysql on a Qnap TS-451 NAS - yiannispap - 2021-03-17

All of my settings in the sql server are as in wiki. I cannot open the image you' ve sent me (gives me error) so where is my.ini / my.cnf file, somewhere in kodi profile or in the sql server? I have not set up an sql server in my nas from the scrap, it was ready as an app and I just enabled it, creating the user kodi and never had issues with other kodi device!!!


RE: Kodi & Mysql on a Qnap TS-451 NAS - gibxxi - 2021-03-17

(2021-03-17, 19:08)yiannispap Wrote: All of my settings in the sql server are as in wiki. I cannot open the image you' ve sent me (gives me error) so where is my.ini / my.cnf file, somewhere in kodi profile or in the sql server? I have not set up an sql server in my nas from the scrap, it was ready as an app and I just enabled it, creating the user kodi and never had issues with other kodi device!!!

To be able to access the host OS and it's files on the NAS you'll need an SFTP client and a SSH Client. I recommend WinSCP for SFTP access with PuTTy for the SSH/CLI functionality, since PuTTy can be integrated into WinSCP as it's default SSH/CLI tool. See here for details.

However, you might want to spend some time doing some research on the QNAP forums with regards SSH access first. If you start messing around with files on the NAS without knowledge or understanding of what your doing, you could seriously affect the functionality of the device.

Dan / Gib.


RE: Kodi & Mysql on a Qnap TS-451 NAS - yiannispap - 2021-03-18

I know PuTTy And have it installed in my PC, I have already connected to my NAS, but I do not know what and where to change it!


RE: Kodi & Mysql on a Qnap TS-451 NAS - jeffski10 - 2021-03-20

(2021-03-17, 19:08)yiannispap Wrote: All of my settings in the sql server are as in wiki. I cannot open the image you' ve sent me (gives me error) so where is my.ini / my.cnf file, somewhere in kodi profile or in the sql server? I have not set up an sql server in my nas from the scrap, it was ready as an app and I just enabled it, creating the user kodi and never had issues with other kodi device!!!

The file is at  /etc/config/my.cnf  .

I have my 'kodi' user  set to % for hosts and it works fine internally and externally.


RE: Kodi & Mysql on a Qnap TS-451 NAS - yiannispap - 2021-03-20

(2021-03-17, 04:19)Klojum Wrote:
(2021-03-16, 23:17)yiannispap Wrote: Here is the log with the 127.0.0.1 IP

Access denied for user 'kodi'@' localhost' (using password: YES)
That's looks a bit more logical. Apparently the NAS does some internal IP/hostname translation.

Perhaps you can enable skip-name-resolve in the my.ini / my.cnf file (whichever filename is relevant for your QNap NAS).
Also disable any bind addresses in that configuration file.
Image

Then there are the database user privileges. Did you follow the instructions here? https://kodi.wiki/view/MySQL/Setting_up_MySQL
Doublecheck what the values for the database user 'kodi' are? All but one should be set to 'yes'.
What is the value for the 'Host' field of the user 'kodi' in the 'mysql' database system table?

A request to Klojum: Please could you resend this image so I can open  and read it?


RE: Kodi & Mysql on a Qnap TS-451 NAS - Klojum - 2021-03-20

(2021-03-20, 19:02)yiannispap Wrote: A request to Klojum: Please could you resend this image so I can open  and read it?

Oops.. Hot-linking wiki graphics is a no-no. This should work.
Image


RE: Kodi & Mysql on a Qnap TS-451 NAS - yiannispap - 2021-04-01

I have contacted with QNAP support, they asked all the relative informations and the log file from my NAS after the try. After few days finally they gave me this reply: I apologize as this is out of scope of our support and I'm not equipped to troubleshoot this type of issue.
Please try to check possible workarounds through our forums or other forum channels. Is there a chance to find out anything from this Qnap log file? (How can I send it to you?)