Solved

MySQL Causing High Server Load

Posted on 2009-07-06
5
369 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

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 …
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Suggested Courses

628 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