OSMC MYSQL Startup problem

What you’re talking about is a completely separate issue to the original poster.

He has his mysql sever running on another machine, thus OSMC must wait for the wifi connection to come up before launching Kodi. This is achieved by the wait for network option in the networking GUI. (which didn’t exist at the time of the original post)

What you are talking about is waiting for a locally running mysql server to finish starting before Kodi is launched. This is done differently.

Even though mysql may be a legacy init script (I haven’t looked) you should still be able to use an After clause in the mediacenter service to make it wait for mysql to start. Can you try this for me:

Create a new file here:

/etc/systemd/system/mediacenter.service.d/local.conf

In this file put only these lines:

[Unit]
After = mysql-server.service

The after line should obviously match the service name if it is a systemd service, however if it is a legacy init script service, find the service name and append .service on the end. (Please let me know what the service name is, if I don’t get time to check myself)

Please try this and let me know if it works because if it does we are talking about adding an After dependency into the standard mediacenter service unit.

This works because if the mysql service is disabled or does not exist it is ignored and does not delay Kodi launch, but if the service is installed and enabled it would automatically delay Kodi until mysql loads without any manual user configuration.