Hi, I was having the same problem. Kodi starts up then the network comes up later so it does not connect to the mysql database. My machine is a H96 Pro+ with the Amlogic S912 soc.
I tried all the answers above which did not work. I then settled on a simple fix.
I created an autostart.sh file in the .config directory and added
sleep 15
This did stop kodi for 15 seconds to allow the network to establish.