Change start-up options for mysqld in whm on CentOS

Viewed 20

I have a WHM/Cpanel server set up on CentOS 7.6.

I need to set up my mysqld process with a start-up option --init-file, to be ran every time the service is restarted.

I assume there is a file somewhere on the server that tells WHM what options to use when starting the service mysqld. But I can't find it.

Thanks Matt

1 Answers

Figured out that CentOS uses the systemd service initializer.

Answer: Edit the mysqld.service file in /usr/lib/systemd/system

Then you have to reload the systemctl daemon. Run command: systemctl daemon-reload

Then restart mysql from WHM and it will execute the option

Related