Moving Kodi central database from old server to new server
#1
Long time Kodi user here, but I am having some issues getting my newly built server to integrate with existing Kodi installs on other PCs.
Prior to my new server build, I have Kodi installs connecting the the SQL database(s) on my (old) server.  

What I have done so far:

Changed my advancesettings.xml file to reflect the new IP address (host) of my new server.
The user/pass is the same as before.  
Setup MySQL on the new server using the normal (same) user/pass.
All firewall rules are in place per the instructions.
I have tried exporting my existing library per the instructions, but when trying to import the library it does not seem to be working, which as I understand it, creates the new SQL database(s).

I am verifying that the databases are not being created in MySQL as I am not seeing the normal "mymovies**" database, therefore there is no "movies" option in Kodi.

Any help is greatly appreciated!
Reply
#2
Should there be a MySQL/MariaDB connection problem, then that would appear in Kodi's debug log (wiki).
So have a peek there, and/or upload it to our pastebin website (see link below), and we can have a look.
Reply
#3
(2019-08-07, 17:31)Klojum Wrote: Should there be a MySQL/MariaDB connection problem, then that would appear in Kodi's debug log (wiki).
So have a peek there, and/or upload it to our pastebin website (see link below), and we can have a look.
If you could, please have a look at my debug log here:

riduqunaza.kodi (paste)

Thanks in advance!
Reply
#4
Also, it is worth noting a little more detail on my library exporting/importing.  I have tried both the "single" and "separate file" ways of doing this.  I think it was recommended to do the "separate file" method.  I can see the all the .nfo files that were created in the folder that holds all of my movies, so I know the export feature is working.  When I point Kodi to where I exported them during the import, it does nothing.
Reply
#5
17:52:16 T:16880 ERROR: Unable to open database: MyVideos99 [1129](Host '10.0.0.112' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts')
17:52:16 T:16880 ERROR: Unable to open database: MyMusic56 [1129](Host '10.0.0.112' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts')

Either you have configured your MySQL server incorrectly, or you have an insane amount of Kodi clients connecting to your database server.
What do you use for a MySQL or MariaDB server, and on which operating system? All on that same AMD Ryzen Threadripper 1950X machine?
Reply
#6
(2019-08-08, 00:35)Klojum Wrote: 17:52:16 T:16880 ERROR: Unable to open database: MyVideos99 [1129](Host '10.0.0.112' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts')17:52:16 T:16880 ERROR: Unable to open database: MyMusic56 [1129](Host '10.0.0.112' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts')

Either you have configured your MySQL server incorrectly, or you have an insane amount of Kodi clients connecting to your database server.
What do you use for a MySQL or MariaDB server, and on which operating system? All on that same AMD Ryzen Threadripper 1950X machine?
Currently, I only am trying to connect my Threadripper to the new server.  No other PC's in my house are currently on, nor have they been configured yet to the new server. 

I am using MySQL 8.0 on a Windows Server 2019 machine with a Xeon W-2102.
Reply
#7
Also, the IP in the error log (10.0.0.112) is the address of my modem/router.  The IP (static) of my server is 10.0.0.82.  I am not sure if this is part of the problem here.

It is also worth noting that I have two networks on the Threadripper and Server.  One is my 1gb connection which goes to my switch, and the other is my directly connected 40gb Mellanox which has priority between these two machines.  The IP address I am using in the advancesettings.xml is for the 1gb lan.

When using the other (Mellanox) network IP in the advancedsettings.xml , it still loads Kodi, but I have the same problem.
Reply
#8
(2019-08-08, 01:08)djdrock Wrote: Also, the IP in the error log (10.0.0.112) is the address of my modem/router. The IP (static) of my server is 10.0.0.82. I am not sure if this is part of the problem here.

It is also worth noting that I have two networks on the Threadripper and Server. One is my 1gb connection which goes to my switch, and the other is my directly connected 40gb Mellanox which has priority between these two machines. The IP address I am using in the advancesettings.xml is for the 1gb lan.

If for whatever reason the link gets rerouted to something else than the MySQL server's IP that is hardcoded in the advancedsettings.xml file, that would indeed be a problem. I've never seen that happen before. But apparently Kodi is being fooled into doing so.

I suggest you create a ticket for that in our Github Bug Tracker with full info on the matter.
Reply
#9
Yes, that is very odd and I thought it was a problem.  I am glad you caught this.  Just in case you did not catch it, I am using Kodi 16.  I am wondering if I did an upgrade if that might help. I always hesitate to do too many things at once for this very reason as it is much harder to track down problems.  In other words, I know that Kodi 16 worked for years, so employing new hardware and software makes it even harder to sometimes know what is causing the issue.

But just another quick note, well more of a reminder, using the same PC (Threadripper), I can immediately go back to my old advancesettings.xml file and Kodi works.  This of course connects to my OLD server.  Would you say this sounds more like a SQL problem than a Kodi problem perhaps?
Reply
#10
After a 'flush hosts' in SQL, and running Kodi again, I get the following error(s) in the log:

ERROR: Unable to open database: MyMusic56 [2059](Authentication plugin 'caching_sha2_password' cannot be loaded: The specified module could not be found.
ERROR: Unable to open database: MyVideos99 [2059](Authentication plugin 'caching_sha2_password' cannot be loaded: The specified module could not be found.

There are numerous occurrences of these errors with the MyMusic## and MyVideos##.

Is this of any help?

I am not sure why Kodi would be trying to open any of these databases as they have not even been created yet.  I thought that was the entire point of importing the library, which again, I am unable to do.  Is the "open" an attempt to search to see if they exist?
Reply
#11
Some good news...but still need some help...

There are no more errors on the debug log. :-)

I uninstalled MySQL 8.0 and went back to 5.5 and did the necessary steps in getting MySQL set back up.
I then went back into Kodi to import my library. The good news is, when doing the 'show databases;' command in MySQL I can now see "mymusic56" and "myvideos99", so obviously the databases are being created now.
The bad news is, when I did the library import, it seemed to do nothing else but create the databases. I would have thought that there would be a progress bar of sorts showing me that Kodi is populating the databases.
When running the ' SELECT COUNT(*) from myvideos99.movie; ' command, it returns 0.
Looks like I am getting closer but still need to get my database(s) populated.
There is still no 'movies' area in Kodi.
Reply
#12
SOLVED!

As it turns out, using a newer version of MySQL was the problem, at least for me.  Going back to 5.5 did the trick.  

I went back and exported the library again using single file mode, then the import library function worked. 

I hope this helps someone in the future.
Reply
#13
MySQL 5.5 support is about to be dumped, v5.7 is a better choice.
I could perhaps test MySQL 8.0 on my Windows setup, but I'm not a regular Wikndows user.

Can you do a export from MySQL 8.0 and import that into 5.5 directly, without any Kodi intervention?

EDIT: So apparently MySQL 8.0 has some quirks that need to be figured out.
Reply
#14
I almost grabbed 5.6 or 5.7 but thought it best to just use what I know has worked for me.

I did slightly look into some MySQL commands that would allow me to export/import without using Kodi at all, but did not find anything that worked for me.

So yes, it does seem that there are some quirks with 8.0.  Hopefully this helps the developers in the future. 

Thanks again for your help!
Reply

Logout Mark Read Team Forum Stats Members Help
Moving Kodi central database from old server to new server0