Kodi Community Forum
Kodi Database on Brand new Qnap with MariaDB - 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: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52)
+---- Thread: Kodi Database on Brand new Qnap with MariaDB (/showthread.php?tid=368547)

Pages: 1 2 3


RE: Kodi Database on Brand new Qnap with MariaDB - Klojum - 2022-06-12

(2022-06-12, 03:08)themusj Wrote: Second. I sent the log to https://paste.kodi.tv/. Trust I did it right. A first.

Nope... Smile You need to save the log file via CTRL-S or click on the diskette icon in the top right corner. That will process your log file, and get you a new URL that includes the reference to your log.

(2022-06-12, 03:08)themusj Wrote: Using Putty, I can only login with my new user account (upon setup) and the re-enabled admin account. IE, using the same internal IP address as my Qnap.
Basically, admin = root . So using that account during a SSH session, you should be able to get into the mysql (mariadb) environment by entering only the command mysql. Does that get you the mysql> prompt?
If so, then try the SHOW DATABASE; command as well as the other sql commands.


RE: Kodi Database on Brand new Qnap with MariaDB - themusj - 2022-06-12

With Putty connecting to the IP of my Qnap, logging in with admin and password, the results are:

[~] # mysql
-sh: mysql: command not found
[~] #

I'll try uploading the log shortly. I was able to paste it and clicked on Save. But I did not get a reference so I did it wrong. :-)


RE: Kodi Database on Brand new Qnap with MariaDB - themusj - 2022-06-12

Well, do I have to login to use hastebin? I paste the text, did a Control+S and then it blinks as if it received it, but I get no reference or anything indicating life is good.

My advancedsettings are:
<advancedsettings>
<videodatabase>
<type>mysql</type>
<host>192.168.30.75</host>
<port>3306</port>
<user>root</user>
<pass>*****</pass>
</videodatabase>
<videolibrary>
<importwatchedstate>true</importwatchedstate>
<importresumepoint>true</importresumepoint>
</videolibrary>
<loglevel>2</loglevel>
</advancedsettings>

and a bit of more information.
2022-06-11 20:43:12.864 T:6592   DEBUG: CIRServerSuite::Connect: connecting to: 127.0.0.1:24000 ...
2022-06-11 20:43:13.342 T:17540   ERROR: Unable to open database: MyVideos116 [2002](Can't connect to MySQL server on '192.168.30.75' (10061))
2022-06-11 20:43:14.899 T:6592   DEBUG: CIRServerSuite::Connect: failed to connect
2022-06-11 20:43:14.899 T:6592    INFO: CIRServerSuite:Tonguerocess: failed to connect to irss, will keep retrying every 5 seconds


RE: Kodi Database on Brand new Qnap with MariaDB - Klojum - 2022-06-12

(2022-06-12, 16:08)themusj Wrote: But I did not get a reference so I did it wrong.
Or, QNAP is simply being a d!ck and won't allow it.

(2022-06-12, 16:18)themusj Wrote: do I have to login to use hastebin? I paste the text, did a Control+S and then it blinks as if it received it, but I get no reference or anything indicating life is good.
Nope, just paste the log into the text window and click the disk icon. That should save the log properly, unless it's way too large.
You could try https://paste.ubuntu.com , it can handle larger log files.

(2022-06-12, 16:18)themusj Wrote: Unable to open database: MyVideos116 [2002](Can't connect to MySQL server on '192.168.30.75' (10061))
You installed MariaDB10, right? With MariaDB5 still in the background (AFAIK), shouldn't you use port 3307 in your advancedsettings.xml file?


RE: Kodi Database on Brand new Qnap with MariaDB - themusj - 2022-06-12

My son is here (his birthday) and he believes we are not logging into the database from Putty, but just the Qnap interface. Hence the reason we are not seeing the mysql commands. 

He believes using my internal IP is just getting into the command line interface of the NAS, not MariaDB. 

It makes sense, but when you putty in, what do you put in but the IP?


RE: Kodi Database on Brand new Qnap with MariaDB - Klojum - 2022-06-12

(2022-06-12, 19:29)themusj Wrote: My son is here (his birthday) and he believes we are not logging into the database from Putty, but just the Qnap interface.
He is correct.

(2022-06-12, 19:29)themusj Wrote: He believes using my internal IP is just getting into the command line interface of the NAS, not MariaDB.
Yup.

(2022-06-12, 19:29)themusj Wrote: It makes sense, but when you putty in, what do you put in but the IP?
In Putty, you connect to the NAS. So you use the IP address of your NAS, which is surprisingly also 192.168.30.75 (just like the database server address, since that is running on the NAS).


RE: Kodi Database on Brand new Qnap with MariaDB - themusj - 2022-06-13

Ok I apologize if I need  brick to hit me on the head. Apparently my son does too then. 

I Putty into 192.168.30.75 (just like the database server address, since that is running on the NAS), I am in the NAS command Line Interface. Got that clear as day.

What my son and I do not know is how from there we get into the MariaDB itself. I would think I could see with the show databases command the list of existing databases.

I am in the house, but how do I get into the bedroom? Once I am in the NAS CLI, I cannot seem to use any command to get me into MariaDB.


RE: Kodi Database on Brand new Qnap with MariaDB - themusj - 2022-06-13

I opened a ticket with Qnap. I’ll share what they have to say hopefully soon.


RE: Kodi Database on Brand new Qnap with MariaDB - themusj - 2022-06-14

Well the great answer from Qnap. 

"In SSH, use this to login to MariaDB /share/CACHEDEV1_DATA/.qpkg/MariaDB5/bin/mysql -u root -p"

Only they pointed me to the wrong MariaDB. I corrected that and am able to get to the MariaDB10/bin directory. But their mysql -u -p is awash. 

"mysql: command not found"

The ls command shows me quite a few files that start with mysql, but as mysql@

I wrote them a follow up.


RE: Kodi Database on Brand new Qnap with MariaDB - themusj - 2022-06-14

So I try this from what I read on the Internet.

./mysql -u root -p and bingo I get a request for password.

Enter password and I get Error 2002 (HY000): Can't connect to local MySQL server through socket ''/tmp/mysql.sock' (2)


RE: Kodi Database on Brand new Qnap with MariaDB - themusj - 2022-06-14

More progress I edit the above with this syntax ./mysql -S /var/run/mariadb10.sock -u root -p

It appears I am in. I see MariaDB [(none)]>

Next puzzle. Typing show databases produces just -> 

IE no results.


RE: Kodi Database on Brand new Qnap with MariaDB - themusj - 2022-06-14

Wrong Syntax used. SHOW DATABASES;

Worked!


RE: Kodi Database on Brand new Qnap with MariaDB - themusj - 2022-06-14

I was able to create a new kodi user with full privilege's. It shows up by using phpMyadmin. Local host %.

So I changed my advancedsettings.xml and I am still getting "2022-06-13 20:24:20.300 T:2916   ERROR: Unable to open database: MyVideos103 [2002](Can't connect to MySQL server on '192.168.25.100' (10061))"

So I will re-group. Post the log file, and hopefully discover the solution.


RE: Kodi Database on Brand new Qnap with MariaDB - themusj - 2022-06-15

Ok wow!. Tonight after spending much time at lunch studying solutions, I came home restarted the NAS and MariaDB. Changed the port in my Kodi advancedsettings to match MariaDB default port 3307, and Kodi opened and the database was created! I have one document right in front of me stating to leave MariaDB at 3307 and Kodi at 3306. So go figure.

After reading the Wiki, a few questions remain.

How do I input my settings (both use the same skin). My windows Kodi currently with the new database has different menu settings and no library.

Best way to import my library? I exported it, but the nfo files our spread over several other NAS drives.


RE: Kodi Database on Brand new Qnap with MariaDB - themusj - 2022-06-15

Looks like as far as the library goes, a set content rescans everything. Likely the best way I assume. Running that now.

Still need help on getting my skin / menu settings back.

And I read somewhere one should set in the advancedsettings cache and buffer size?

A journey only possible by everyone's help!