Thanks, using 127.0.0.1 instead of localhost does fix the problem with opening the mariadb on the same system
However, accessing a mariadb on a remote system is still an issue. I've increased the wait to 60 seconds, and still no database connection at boot time. It is evident that the system is not waiting for the time to elapse before the user interface is shown with no database connected. Irrespective of the parameter, the user interface shows in <10 seconds. When connected via ssh, I repeatedly systemctl restart mariadb and systemctl restart kodi and eventually the database does connect; taking between 15 and 30 attempts. A work around but hardly optimal!