Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 373
  • Last Modified:

MySQL Causing High Server Load

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
FourMat
Asked:
FourMat
2 Solutions
 
tcsaddul9Commented:
Put this in your my.ini configuration file:

[mysqld]
log-slow-queries="C:/mybackup/slowqueries.txt"
long_query_time=10
0
 
NerdsOfTechCommented:
Do you have a backup of the db you can reupload?
0
 
NerdsOfTechCommented:
In fact it is possible that it is your PHP files that may be tainted as well

e.g. trojan coding
0
 
gokce_yalcinCommented:
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
 
FourMatAuthor Commented:
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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now