Changing networked media drive's hardware without losing library

Maria DB installed and this is what I get running that command:

osmc@osmcveroplayroom:~$ mysql -u kodi -p kodi -h 192.168.1.8
Enter password:
ERROR 2002 (HY000): Can’t connect to MySQL server on ‘192.168.1.8’ (115)

Sorry partly wrong syntax I gave you.
mysql -h 192.168.1.8 -u kodi -p

Then type kodi as password.
But I guess same error will pop up.

Correct guess. It was indeed the same error.

On the RPi, check your /etc/mysql/my.cnf if the bind-address=0.0.0.0 is set.

There’s nothing about bind addresses in that file, just this:

# The MariaDB configuration file
#
# The MariaDB/MySQL tools read configuration files in the following order:
# 1. "/etc/mysql/mariadb.cnf" (this file) to set global defaults,
# 2. "/etc/mysql/conf.d/*.cnf" to set global options.
# 3. "/etc/mysql/mariadb.conf.d/*.cnf" to set MariaDB-only options.
# 4. "~/.my.cnf" to set user-specific options.
#
# If the same option is defined multiple times, the last one will apply.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.

#
# This group is read both both by the client and the server
# use it for options that affect everything
#
[client-server]

# Import all .cnf files from configuration directory
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mariadb.conf.d/

should I be looking at this file:
/etc/mysql/mariadb.conf.d/50-server.cnf

If so, the bind address in there is 127.0.0.1

I gotta go pick my kids up from school now, so will check your response on here later.

Thanks again for the time in helping me sort this out!!

edit in
The quote above wasn’t meant to be in bold… sorry!

Yes, that one means it only listen on the localhost.
You need to change that to 0.0.0.0 and restart the server

Fixed that for you

You could install it from the Windows store, if not already done install SMB server on Vero, bring up Windows explorer and navigate to //ip.of.your.vero and then copy the contents of the .kodi there to Windows at.

%LOCALAPPDATA%\Packages\XBMCFoundation.Kodi_4n2hpmxwrvr6p\LocalCache\Roaming\Kodi\

You would then delete (on the Windows machine) the userdata/guisettings.xml you just copied over and edit the advanceedsettings.xml to add in a path substitution to redirect from the mount point the Veros are using to a UNC path. This should get you fully the same with your old server as on the Veros.

Also be aware that you should not edit file paths in sources. These paths are what get stored in the db so they need to stay the same across all clients and not change unless you remove the library content associated with them first. The path substitution does not set stored in the db so as long as your sources are the same and you follow the above you can scrape and export in Windows and it will be stored in the db consistent with file paths on your Veros.

Dammit… I saw on the Kodi instructions for installing the mysql something about changing the bind address to that, but I got the completely wrong end of the stick on my understanding of the explanation it gave, so I deliberately DIDN’T change the bind address to 0.0.0.0

So it was probably my misunderstanding that’s caused all this issue!

I’ll get it changed now, then reimport the original sql database to see if that works, so I don’t have to rescrape everything.

Don’t need to reimport if that worked the first time.
Change the bind address, reboot and then try accesing he library

Because I thought it hadn’t, I wiped everything to start again with a clean install of MariaDB.

Well, reimported and it looks like all is ok.

Quite slow with a lot of the artwork, but I’m guessing it has to redownload a lot of that?
Especially with newly scraped things, the poster etc stays black for quite a bit. I’ll have to investigate that more as some things don’t seem to updating well.

As I have changed a few files in my library since I exported the DB, there are some films that didn’t exist in the same path any more (e.g. a film used to be .mp4, but is now a .mkv cause I got a HD version upgrading from a SD version). I went to clean the library, and bloody hell was it slow. After 30 odd minutes it was at 2%.

Now I cleaned the library a few times yesterday with the BPi while trying out various things and it completed the whole thing in about 30 minutes, if that, so I’m not sure if that’s a difference between mysql and mariaDB? or a BPi/RPi thing?

Anyway, I’m now on the RPi, and the library is there, and I can watch films in it, so all in that regard seems to be good. Some of the niggles I’ve come across so far will be investigated to see if they persist and what could be causing them, and if they are issues I’ll raise support requests as appropriate.

For now though, as far as this one goes, I think it is done. I can’t believe ended up being as simple as that bind address.

Thanks for the considerable amount of help! Very much appreciated.

If you didn’t change your source paths I don’t think it should have touched any artwork that was already cached on your clients. As for the speed of the clean function I suspect you have dead paths in your db that are slowing it down. If you turn on debug logging during the scan you should be able to see this. MariaDB is not slower than MySQL in my experience and the suggestion to use it stems from Kodi possibly dropping MySQL support in the future. I use Mariadb (on Windows) and have a decent sized library and the clean function for me takes about thirty seconds to complete. You might give this add-on a go to see if it can sort it out for you…

https://forum.kodi.tv/showthread.php?tid=272112

This doesn’t appear to be the case, as quite a few TV series and films which definitely did not have any path change, have now either got different art to what was there before, or I had to go in and manually choose the art for it because the background fanart and poster were blank, when they weren’t before.

If the db was successfully imported and the file paths (as Kodi is seeing them) did not change then no artwork should have changed as source of it is stored in the db (either local or url). Having some missing artwork is normal as online links become unavailable, but if it is grabbing artwork different from what it originally had then that would indicate rescraping taking place. Loss of watched status would be another indicator. Unfortunately this would also mean that the thumbnail folder on all your clients probably will have a lot of dead artwork in them that will never be automatically removed.

Ok, had a day or to of use now and there’s still issues. Things are very slow. And quite frequently the whole thing just freezes for a minute while navigating the menus and then all the keypresses during the freeze happen quickly once it unfreezes.

And when I select play, it stays with a “loading” on the bottom of the screen for 10-15s or so before playing. It never did that before changing to the RPi.

Here’s some logs:

This one is from trying to clean the video library. Once started everything froze including all the CPU and memory info at the top of screen from the debug logging. After I chose to cancel, it took a while to action.
HTTPS://paste.osmc.tv/unipalewoh

I tried to log the delayed playback, but ironically it was fine every time but one after the reboot and the ‘but one’ wasn’t when I was logging.

This log was from a freeze during navigation. I selected a file to play after the freeze and it played fine.
HTTPS://paste.osmc.tv/ezoluwonej

Should I start a new thread for this issue or is it ok to continue here?

There’s nothing obvious in the first log, other than it seems to have stopped working for 5+ minutes or so.

System journal:

Dec 06 08:48:51 osmcveroplayroom kernel: hdmitx: audio: hdmi_ch: 0 speaker_layout: 0
Dec 06 08:48:51 osmcveroplayroom kernel: hdmitx: audio: no update
Dec 06 08:53:35 osmcveroplayroom systemd[1]: Starting Report anonymous OSMC install statistics...
Dec 06 08:53:36 osmcveroplayroom systemd[1]: osmc-report-stats.service: Succeeded.
Dec 06 08:53:36 osmcveroplayroom systemd[1]: Started Report anonymous OSMC install statistics.
Dec 06 08:59:12 osmcveroplayroom kernel: audio_dsp: buf=0
Dec 06 08:59:12 osmcveroplayroom kernel: audio_dsp: IEC958_mode_raw=0
Dec 06 08:59:12 osmcveroplayroom kernel: audio_dsp: IEC958_mode_codec= 1, IEC958 type 2 CH PCM

Kodi log:

2020-12-06 08:49:11.725 T:3722690784   DEBUG: Thread JobWorker 3722690784 terminating (autodelete)
2020-12-06 08:49:11.812 T:3959599328   DEBUG: Thread JobWorker 3959599328 terminating (autodelete)
2020-12-06 08:57:34.753 T:4034916576   DEBUG: CLibInputKeyboard::ProcessKey - using delay: 500ms repeat: 50ms
2020-12-06 08:57:34.755 T:3959599328   DEBUG: Thread Timer start, auto delete: false
2020-12-06 08:57:34.778 T:3959599328   DEBUG: Thread Timer 3959599328 terminating

Any idea how or why that’s happening, or how to stop it, as the temp freezes are quite frequent.

I have no way of knowing what’s happening. It might be some kind of wait for a resource that’s temporarily locked or otherwise unavailable, though that’s about all I can sensibly add.

Is there any tests or logs i can get/do to get more info so I can stop the freezes from happening?