Mysql is being stopped by OOM

That’s configurable. But, you shouldn’t.

Restarting a database that is being killed over and over by the OOM killer is a recipe for data loss.

Solve your memory problem. Don’t solve the “systemd won’t restart MySQL” problem.