| Is there a more elegant way to get SQL working again? I recently had problems with a hosted clients site which resulted in over 1,000 messages being sent to root. Normally this isn't a problem as root mail is forwarded to me, but as this happened overnight, things started to get very full very quickly.
Unfortunately, the lack of security on his script meant that people could repeatedly submit messages one after another. I hasten to add that the script wasn't my work!
To cut a long story short, the tmp directory on my web server filled and as a result mysql.sock went walkabouts. Apart from the obvious problem of the SQL service being down, things started to get more problematic when I realised that simply restarting the service or rebooting the server had no effect whatsoever and mySQL continued to refuse to play ball.
Having scoured the web I found a workaround, which in essence involved rolling back mySQl from 5.0 to 4.x and resetting the root password. I would then be able to start the service and upgrade to mySQL 5.0 again and all would be well.
This worked a treat, and within about 30 minutes I had gone from scratching my head and downloading 1,000 emails to having a fully functional web server again. My question is, is there a more elegant way of achieving the same thing? Did I miss a more obvious way of restarting SQL? Perhaps my method was a little overkill but it worked.
You will also be pleased to note that the clients account was suspended until proper spam protection was added to the script. Now I am getting numerous emails from a broken forum of his instead! |