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!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Possible for end-user to see all their active mysql processes?

Discussion in 'Database Discussions' started by electric, Sep 12, 2017.

  1. electric

    electric Well-Known Member

    Joined:
    Nov 5, 2001
    Messages:
    719
    Likes Received:
    3
    Trophy Points:
    318
    Similar to the "WHM-->SQL Services »Show MySQL Processes" functionality.

    Is it possible for the cpanel end-user to see a list of all their own MySQL processes?

    We sometimes have customers who have crazy mysql problems, and ability for them to see a list of their active mysql processes would be very helpful.

    Thanks!
     
  2. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,447
    Likes Received:
    56
    Trophy Points:
    28
    Location:
    India
    cPanel Access Level:
    Root Administrator
  3. electric

    electric Well-Known Member

    Joined:
    Nov 5, 2001
    Messages:
    719
    Likes Received:
    3
    Trophy Points:
    318
    I actually already have that plugin. It does not provide any end-user interface in their cpanel.

    (It works great for admins, though!)
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,165
    Likes Received:
    1,371
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    It's not possible in the cPanel UI, but they can access their account via SSH and run the following commands to see their active MySQL processes:

    Code:
    mysql
    MySQL> SHOW PROCESSLIST;
    Thank you.
     
  5. electric

    electric Well-Known Member

    Joined:
    Nov 5, 2001
    Messages:
    719
    Likes Received:
    3
    Trophy Points:
    318
    Can this be executed from a cpanel page that I create myself?

    (Can I run that as a mysql query using PHP or something?)
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,165
    Likes Received:
    1,371
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    This is unsupported, but I believe it's possible to use the "mysqli" PHP extension for this purpose per the comment listed at the bottom of the following document:

    PHP: mysql_list_processes - Manual

    Information on creating a cPanel plugin is available at:

    Guide to cPanel Plugins - Software Development Kit - cPanel Documentation

    Thank you.
     
Loading...

Share This Page