Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In my server I noticed that I have mysqld and mysqld_safe processes running simultaneously. Is mysqld_safe supposed to run always, together with mysqld?

share|improve this question
Found another question which answers mine. TL'DR version: Yes – AppleGrew Jan 22 '12 at 4:55
up vote 3 down vote accepted

It is best that does. If you read the the code for mysqld_safe, there is basic startup initialization in the beginning and an indefinite loop at the bottom. Here is the pseudocode description of the Loop

Start the Loop

  • run mysqld inside the loop
  • once mysqld terminates, check for how terrmination occurred
    • if normally terminated, exit loop (such as service mysql stop)
    • if abnormally terminated on startup, exit loop (errmsg posted in error file)
    • if abnormally terminated otherwise, errmsg posted why mysqld died
  • retry mysqld

End of Loop

This is an oversimplified description of what mysqld_safe does

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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