Site Statistics
 
Threads: 3,849
Posts: 17,024
Members: 2,894
Users Online: 22
Newest Member: yurispacedan


Go Back   PC101 > The Internet, Web Design & Networking > Web Design and Development

Web Design and Development Design techniques, conepts, HTML, scripts, software, reviews, sponsors and affiliate programs.


Reply
 
LinkBack Thread Tools Display Modes
Old 06-09-2006, 08:42 AM   #1
Junior Member
 
Join Date: Jun 2006
Posts: 29
Rep Power: 0 John is on a distinguished road
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!
John is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-09-2006, 10:23 AM   #2
Distinguished Member
 
Join Date: Jul 2005
Posts: 2,208
Rep Power: 5 Will.Spencer is on a distinguished road
Wow -- that does sound unpleasant!

When I've had this happen, all I ever had to do was:

1. Delete files to restore free disk space.
2. Run `/etc/rc.d/mysql.server restart` to rebuild /tmp/mysql.sock and restart mySQL.

Did you have to do any rebuilding of the actual databases?
Will.Spencer is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-09-2006, 10:35 AM   #3
Junior Member
 
Join Date: Jun 2006
Posts: 29
Rep Power: 0 John is on a distinguished road
No, fortunately my databases were all in tact and it seemed that it was just the service that had failed.

I tried something along those lines initially, thinking it would be a case of rebuilding and restarting, and whilst the build appeared to complete, the service just would not restart.

It was fortunate that I came across a known problem with the SQL root password.
John is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
DNS are not working ... stoli_sambuca The Internet 4 12-28-2006 11:56 AM
Locate SQL servers on network Buckaroo Marketing 1 10-26-2006 09:29 AM
My wireless isnt working Ronald Wireless Networking 7 06-15-2006 12:03 AM
Microsoft Working to Fix Browser Flaw aleeonline PC Security 0 04-17-2006 02:53 PM
USB Port not working sufi All other hardware 0 01-19-2006 09:31 PM



All times are GMT -5. The time now is 09:53 PM.

Powered by vBulletin Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC5