Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Mysql usage by DB/Account.

Discussion in 'Database Discussion' started by chetanmadaan, Oct 16, 2017.

  1. chetanmadaan

    chetanmadaan Active Member

    Jun 18, 2010
    Likes Received:
    Trophy Points:

    I have a dedicated server that's running around 150+ account(s) and majority of the websites are low traffic and don't get much attention. There top 10 - 20 sites probably get 90% of traffic and sometimes causes Mysql to go down.

    I am trying to figure out which databases/accounts (databases within specific accounts) take up most of the usage so those can be dealt with.

    I don't think the "Show MySQL Processes" or "Daily Process Log" gives out any information specific to the databases within 24 hours period or something similar to a birds eye view.

    I had the host install "mtop" or "mysqltop" (not sure what it's called, been a week) but that seem to only miror "Show MySQL processes" (WHM's interface).

    Any help would be appreciated.
  2. cPWilliamL

    cPWilliamL cP Technical Analyst II Staff Member

    May 15, 2017
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator

    Pinpointing which MySQL users/databases are causing excessive resource usage can be difficult as increased usage may come simply from a higher number of queries, inefficient queries or database structure, or just excessive I/O. CloudLinux's MySQL Governor allows you to impose I/O and CPU limits on individual cPanel accounts to prevent one account from exhausting server resources.
    CloudLinux Documentation

    Without CloudLinux, you'll need to check things like slow queries, manually inspect queries/databases, or impose user level connection limits:
    Slow Query Log Overview
    Handling Too Many Connections

    If using mariadb, you may also try the following:
    User Statistics

    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice