Posted on Leave a comment

If you have not learned systemctl, you need to!

My server for this machine is low memory and the msyql piece craps out all the time. At this point when the site is unresponsive, I don’t even question what the issue will be. One command later and it is running again. After a largely useless legal warning.

Here is the magic command:

systemctl -H prandall@mathcodeprint.com restart mysql

The -H is the magic. This new service controller for system has built in ssh-ing abilities. You will need to provide a password if you have not set up your private keys.

And if I need to check up on the service, same command just with status:

systemctl -H prandall@mathcodeprint.com status mysql

For reference the old process would have been

ssh prandall@mathcodeprint.com
password
service mysql restart
exit

I know it doesn’t seem like a lot but, some of you will understand.

Leave a Reply

Your email address will not be published. Required fields are marked *