I want to turn on and off the mysql server through java, this is just an exercise, I used the org.apache.common.exec package to run the command, the only problem is that I can only do it through the daemon with
sudo launchctl unload -F /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist
(this to turn off the server) and I would like to see if they have any command to know the status through the daemon because with the other commands I searched for I get a Pid error.
I had been told in another question that the status of the server could be known through the jdbc but I can not find that form.