Can someone explain how to start a MySQL server with SSL options enabled using systemd? I've generated certificates and edited the my.cnf file to enable SSL but I'm not sure how to restart MySQL so that it allows SSL connections to be made with systemd.

This command did the trick before systemd but it now now longer works:

/etc/init.d/mysql start --ssl-ca=/etc/mysql/newcerts/ca.pem --ssl-cert=/etc/mysql/newcerts/server-cert.pem --ssl-key=/etc/mysql/newcerts/server-key.pem

Any help would be much appreciated.

1 Answer 1


You can the SSL variables into the my.cnf file and load on regular systemctl call.

  • For some reason the changes I make to the my.cnf file only come into effect when I reboot the server entirely. I've tried restarting mysql using: systemctl restart mysql.service but the settings remain unchanged. I've tried making a few different changes in the my.cnf file e.g. changing thread pool settings and again, they only come into effect when I reboot the machine. Does anyone know why this might be the case? I'm running Debian 8 if that is of any help. Commented Jun 22, 2015 at 10:52
  • Might be you need a systemctl daemon-reload
    – dland
    Commented Feb 25, 2022 at 11:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.