I am actually using MariaDB (drop-in replacement for MySQL).
I'm trying to make some changes to my systemd mysql.service file.
I can see it exists because running sudo systemctl lists it and indicates that it is loaded / active / running.
The issue is that I can't find the file to make edits. From what I've read in various articles I've found is that the doc should be located at
/etc/systemd/system/multi-user.target.wants/mysql.service
But it isn't. I've browsed through other directories at the /etc/systemd level to no avail. Any ideas?
Best Answer
For units defined in static files you could use
systemctl status
, with the information outputed issuing that command, you will be able to see its location.For example:
Note that the tab command could be helpful here.
Therefore, in my system the systemd services are placed under
/usr/lib/systemd/
. Please, note that there could be folders in that location.Another way is to use the
find
command in that specific location to find a service:# find /usr/lib/systemd/ | grep -i mysql
I hope that helps ;)