Solved

MySQL Causing High Server Load

Posted on 2009-07-06
5
365 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

816 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

8 Experts available now in Live!

Get 1:1 Help Now