Solved

MySQL Causing High Server Load

Posted on 2009-07-06
5
367 Views
Last Modified: 2013-11-08
Hello, I just found that my server has been compromised and a hacker has put some illicit code into my oscommerce installation.  I have removed all of the code that I can find, but for some reason, whenever I reload the oscommerce script, it maxes out the CPU  and bogs the server down until it's finished processing.  I can't seem to find out which query is doing it.

Is there a tool that I can install on my server that would allow me so see which queries are causing the high load?  

Running CentOS 5 Apache2, Mysql 5.0.81  php(latest)
0
Comment
Question by:FourMat
5 Comments
 
LVL 3

Accepted Solution

by:
tcsaddul9 earned 250 total points
ID: 24792045
Put this in your my.ini configuration file:

[mysqld]
log-slow-queries="C:/mybackup/slowqueries.txt"
long_query_time=10
0
 
LVL 19

Expert Comment

by:NerdsOfTech
ID: 24792298
Do you have a backup of the db you can reupload?
0
 
LVL 19

Expert Comment

by:NerdsOfTech
ID: 24792305
In fact it is possible that it is your PHP files that may be tainted as well

e.g. trojan coding
0
 
LVL 6

Assisted Solution

by:gokce_yalcin
gokce_yalcin earned 250 total points
ID: 24793342
You can install "mytop", its a linux real time mysql monitoring commandline tool. It will give you which queries running with times, and stats like keyword efficiency, queries per second etc.
0
 

Author Comment

by:FourMat
ID: 24799366
Hey Guys, thanks for the help.  As it turned out, it wasn't a problem with a hacker after all, it was just a coincidence.  My customer added a ton of products to the database which escalated the number of queries it had to perform.  So, the installation of the diagnostic tools really led me to the solution.  Thanks for the help!
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
mysql between clause 2 32
insert into database through form with dynamic fields. 2 40
web server: redirect 123.domain.com to www.domain.com/123 16 38
Apache module 5 48
This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question