Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Best way to BASH restar MySQL?

Discussion in 'General Discussion' started by Secmas, Jan 20, 2013.

  1. Secmas

    Secmas Well-Known Member

    Joined:
    Feb 18, 2005
    Messages:
    330
    Likes Received:
    1
    Trophy Points:
    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
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,423
    Likes Received:
    1,956
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello :)

    The following command will restart MySQL:

    Code:
    # /scripts/restartsrv_mysql
    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Secmas

    Secmas Well-Known Member

    Joined:
    Feb 18, 2005
    Messages:
    330
    Likes Received:
    1
    Trophy Points:
    168
    Thank you CpanelMichael, appreciated.

    Sergio
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice