Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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. serverfault.com/q/70613/60058 TL'DR version: Yes –  AppleGrew Jan 22 '12 at 4:55
add comment

1 Answer

up vote 2 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
add comment

Your Answer

 
discard

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.