LibreELEC has a "Wait for network" option. Has that been enabled?
If the network is not up yet (because LibreELEC may have booted too quickly), then the database connection will also likely fail.
Yes, I've already tried that option but I noticed something odd while doing so.
When I enabled it and rebooted, it DOES bring up library but the RPi4 freezes almost immediately, then black screen (as though it detected the Ethernet being down) while the message "waiting for network..." is displayed, then Kodi starts up again and freezes, continues to do this. Meanwhile the LEDs (orange/green) turn on and both go off, and it repeats this. Sometimes, it just freezes on boot and I have to hard reset it.
Could this be the issue concerning the freezing: PI4 - freeze on scrolling lists
EDIT: I did try CMA=64M, GPU_MEM=192M as I read within that thread, but still have the same issue...
EDIT2: I didn't realize that the CMA thing needs to be cmdline.txt not config.txt. Now it doesn't freeeze anymore.
EDIT3: Nope, played a video stop it, and the menu freeze again, argh....