Solved

MySQL Causing High Server Load

Posted on 2009-07-06
5
356 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
Comment Utility
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
Comment Utility
Do you have a backup of the db you can reupload?
0
 
LVL 19

Expert Comment

by:NerdsOfTech
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
If you use Debian 6 Squeeze and you are tired of looking at the childish graphical GDM login screen that is used by default, here's an easy way to change it. If you've already tried to change it you've probably discovered that none of the old met…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

744 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now