Kodi Community Forum
v17 MySQL-database disappear allways - 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: v17 MySQL-database disappear allways (/showthread.php?tid=339389)



MySQL-database disappear allways - Rapid1898 - 2019-01-15

Hello,

i will give it a new try for my problem with a central MySQL-database (old thread is closed) -

I have a Kodi infrastructure running with a central MySQL database on a Synology 209 NAS - everything works fine for years but in the last time i run in the problem that my full central mysql database allways disappear after sometime.

So for example i start the windows kodi client and seek for new content (films are also stored on the nas) - the database get filled everything looks fine - when i have a look with phpmyadmin into the mysql database also everything looks fine - then i wait 2 hours for example - have a look in phpmyadmin => and the database is gone...

So here is the log for the first data import in kodi - everything fine:
https://paste.kodi.tv/okuqumunay.kodi

So here is the log for the second data import in kodi - also everything fine:
https://paste.kodi.tv/fumebubaho.kodi

So it looks like in the phpmyadmin - everything fine:
https://drive.google.com/file/d/1nOHFbrZiQwrYoAoEjO5bmjrDIkFEyJiJ/view?usp=sharing

After 2 hours - the database disappeared:
https://drive.google.com/file/d/1wA-oQn10yPxn_Hmgp10sOA3bQZBYilyZ/view?usp=sharing

Log after starting kodi again afterwards - no film database:
https://paste.kodi.tv/pafilimaze.kodi

What i tried so far:
- fresh install from kodi v17
- deinstalled / installed mysql database von synology nas
- changed the hd-volume in the synology nas (i have 2 volumes in the nas)

And the end now i think the problem lies on the mysql db on the nas - also asked the question in the synology forums but nobody could help me so far

Are there any logs in the mysql where i can see what happens to the database?
Any other hints or ideas what i can check?


RE: MySQL-database disappear allways - Klojum - 2019-01-15

06:39:48.254 T:8932 INFO: MYSQL: Connected to version 5.1.49
I thought my 5.5.26 MySQL server was old, but that is ancient. Smile

Both your Kodi databases (music and video) are being deleted somehow? If there is is something that Kodi does NOT do, is to delete a database. There is not a "drop database" query in the Kodi source code AFAICT. And especially while Kodi is fully running after some hours?!?

So there must be something else going on. Perhaps your NAS got hacked?!? (Just a brainfart, but who knows)
Turn on the logging of your mysql server and see what happens after reinstalling the databases.


RE: MySQL-database disappear allways - Rapid1898 - 2019-01-15

OK thanks.

How can i turn on the logging of the mysql server?
(in phpmyadmin or otherwise?)

And with "reinstalling the database" you mean doing a source-search again in kodi to create an fill the database - right?


RE: MySQL-database disappear allways - Kib - 2019-01-15

kodi update progress for databases is fairly simple:

It creates a new database and migrates all the data there. It leaves the old database in place.
As long as you followed https://kodi.wiki/view/MySQL/Upgrading there should be no issue.

I have no clue to what is dropping your databases, but I am quite sure it isn't Kodi.


RE: MySQL-database disappear allways - Klojum - 2019-01-15

I happen to have a DSM209 NAS as well, and just installed the latest databases for RC5. It's not the fastest solution, but it works so far. And the databases are still there. Smile


RE: MySQL-database disappear allways - Rapid1898 - 2019-01-15

@Klojum 
How can i install a newer MySQL-Version on the DSM2009?
(i only activated the checkmark under WebService - there where i can also activate the Web Station)


RE: MySQL-database disappear allways - Klojum - 2019-01-15

(2019-01-15, 15:01)Rapid1898 Wrote: How can i install a newer MySQL-Version on the DSM2009?

You can't. Synology support stops after some 5 years for their NAS products.

Alternatively, get a simple PC, install Ubuntu Desktop or Server on it, and you can make that your file and database server. Synology NAS has lots of functionality that you'll never need, but it's also getting outdated. Sad


RE: MySQL-database disappear allways - scott967 - 2019-01-16

I just set up a new 418play that comes with DSM 6.2 (have DSM 4.something on the old one).  It seems about the same (though requires you to use passwords for users you set up on it).  But it comes with MariaDB 10.2 out of the box so maybe that's the real answer.  I assume you can't get an up to date MariaDB package for the older DSMs?

scott s.
.


RE: MySQL-database disappear allways - Rapid1898 - 2019-01-21

Near one week gone and now it seems to work for serveral days without problems - what have i done:

At first i created a additonal test-db in mysql (which has nothing to do with the kodi-database) then it works fine for 2 days

and then somebody gave me the additonal hint that i should check if my mssql port is open for external access (port forwarding in the router) and if my root-user has a password - so i saw that my root-user had no password so i changed this in phpmyadmin (root-user for localhost) and also deleted the port-forwarding in my router for the myssql-port

Since that i have no more problems - now again with 5 kodi-clients (1x windows, 4x firetv)


RE: MySQL-database disappear allways - sepulchre - 2019-01-25

I've started having an issue where the databases exist (MyMusic72 and MyVideos116) but both are completely empty, this has happened twice since the new year and I'm yet to work out why the keep going from a populated state to empty. I'm not sure if its related to the OP's issue but maybe someone else has a similar experience and can offer suggestions?

Based on this thread however I've checked all my port forwarding which seems OK and I've changed all the SQL passwords in the hope of addressing it.


RE: MySQL-database disappear allways - Klojum - 2019-01-25

(2019-01-25, 19:19)sepulchre Wrote: I've started having an issue where the databases exist (MyMusic72 and MyVideos116) but both are completely empty, this has happened twice since the new year and I'm yet to work out why the keep going from a populated state to empty. I
One other option would be a hacker executing the TRUNCATE command on your database tables... But this is by far the worst-case scenario.
Completely empty database would be when they have been created, but no scraping whatsoever has yet taken place. Check your kodi.log file after scraping your video/music collections.


RE: MySQL-database disappear allways - sepulchre - 2019-01-25

Actually that is perhaps what’s happening. The databases are present with complete structure - all the expected tables are present.

I’ve had this every few days, I always repopulate the databases from a fresh scrape but then woosh, empty again a few days later. Unfortunately this has happened each time I’m away on business, I will see if it happens again now the passwords have been changed and take a look at the logs.