Best way to BASH restar MySQL?

Secmas

Well-Known Member
Feb 18, 2005
350
9
168
Hi,
I have a BASH scritp that does an optimization and after that a backup of all the databases in the server and I wish to add a restart MySQL after the backup.

Is safe to add a command line service mysql restart or do I have to stop and start mysql or is a better way to do this?

Thanks for your inputs.

Sergio
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
Hello :)

The following command will restart MySQL:

Code:
# /scripts/restartsrv_mysql
Thank you.