SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Addict ibeblunt's Avatar
    Join Date
    Jan 2001
    Location
    Jersey City, NJ
    Posts
    312
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Restarting The Server

    I'd like to know is there a way that I can run a cron-job to reset the mysql server and then restart the server?

    If so, what would be the command?
    <///////~

    www.sohh.com

  2. #2
    Making a better wheel silver trophy DR_LaRRY_PEpPeR's Avatar
    Join Date
    Jul 2001
    Location
    Missouri
    Posts
    3,428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you have to have enough access to do this, you know? are you just wanting to restart MySQL? this is how i've seen it done, so i guess you'd use these commands in cron to stop MySQL and then start it again.

    /etc/rc.d/init.d/mysql stop
    /etc/rc.d/init.d/mysql start

    dunno if that'll work. that's what i've seen though!
    - Matt ** Ignore old signature for now... **
    Dr.BB - Highly optimized to be 2-3x faster than the "Big 3."
    "Do not enclose numeric values in quotes -- that is very non-standard and will only work on MySQL." - MattR

  3. #3
    SitePoint Addict
    Join Date
    Nov 2001
    Location
    Dublin, Ireland
    Posts
    313
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you don't mind me asking, why do you need to do such a thing? If anything goes wrong during the reboot you could be in for some serious downtime!

  4. #4
    SitePoint Addict ibeblunt's Avatar
    Join Date
    Jan 2001
    Location
    Jersey City, NJ
    Posts
    312
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Be honest with yourself, when have you experienced trouble during a reboot?

    Personally, it's never happened. But here's my rationalization.

    1. I'm not a Linux person.

    2. My server isn't where I live.

    Therefore, if I reset it, it doesn't matter if it doesn't come back up 'cause I wouldn't know what to do to fix it anyway.

    My site gets a lot of traffic. I have over 60,000 users and over 600,000 posts in my forums. (That's a little bit more than Site Point [no disrespect intended]) The server was running fine for 51 days without one restart but today it was sluggish and a nice reboot fixed the problem.

    But thanks for your concern.
    <///////~

    www.sohh.com

  5. #5
    SitePoint Addict
    Join Date
    Nov 2001
    Location
    Dublin, Ireland
    Posts
    313
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Granted, I have never had trouble with a reboot -- but expect the unexpected is an important phrase.

  6. #6
    Are you ready for BSD? Marshall's Avatar
    Join Date
    Dec 2001
    Posts
    373
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'd like to know is there a way that I can run a cron-job to reset the mysql server and then restart the server?
    Um. Cron jobs are scripts run automatically at certain time increments. If you always need to restart your server after X amount of uptime than something is seriously broken and you should fix it instead of avoiding the problem.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •