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.

my server (CentOS) contains lots of website, which collect data from lots of sources with cron. the mysql config is the default

recently, PHP failed to communicate with mysql. Firstly I just restart the server

but after restarted, PHP still failed to communicate with mysql

I've tried:

ps ax | grep mysql

Then run: kill -9 #### (I've also tried killall -9 ####) - this failed, ps ax | grep mysql showing the killed process id is still there

service mysqld start (I've also tried /etc/init.d/mysqld start) - I got reply Timeout error occurred trying to start MySQL Daemon.

when run top, mysqld_safe is appeared on top with about 50% of CPU usage. I dont know the size of all the database.

I really confused

share|improve this question

2 Answers 2

Remember, mysqld_safe IS NOT MYSQL. It has a loop in it to call mysqld, the actual server daemon process. It was probably looping itself silly trying to start up mysqld. That was all the problem was.

You should always

  • make sure the socket file from the last time mysqld ran is gone.
  • check the mysql error log after a failed startup.
share|improve this answer

I think it is a hardware problem or at least the HDD is very slow. Can you please paste the /proc//status content? Can you run also dmesg and paste the last 20 lines?

share|improve this answer

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.