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!

Which script allows remote MySQL access?

Discussion in 'Database Discussion' started by SoftDux, Mar 6, 2019.

  1. SoftDux

    SoftDux Well-Known Member

    Joined:
    May 27, 2006
    Messages:
    1,024
    Likes Received:
    5
    Trophy Points:
    168
    Location:
    Johannesburg, South Africa
    cPanel Access Level:
    Root Administrator
    Hi,

    Can someone please tell me which script is used to allow remote MySQL access? i.e. in cPanel, when a client adds his IP address to the Remote MySQL list, what script is used in CentOS to add the IP to the database tables?

    I am asking, since we use ConfigServerFirewall, and I want to automatically allow that IP address through the firewall with port 3306.


    To explain what I am looking for, cPanel has a prewwwacct script which can be customized to run other scripts upon creation of a new account. I am looking for the same script for MySQL Remote Access
     
  2. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,502
    Likes Received:
    509
    Trophy Points:
    263
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. SoftDux

    SoftDux Well-Known Member

    Joined:
    May 27, 2006
    Messages:
    1,024
    Likes Received:
    5
    Trophy Points:
    168
    Location:
    Johannesburg, South Africa
    cPanel Access Level:
    Root Administrator
    I don't think the API will help in this case, as it needs to be triggered by a 3rd party script.

    What script gets run when a user adds his IP to the MySQL Remote Access list in cPanel?
     
  4. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,502
    Likes Received:
    509
    Trophy Points:
    263
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. SoftDux

    SoftDux Well-Known Member

    Joined:
    May 27, 2006
    Messages:
    1,024
    Likes Received:
    5
    Trophy Points:
    168
    Location:
    Johannesburg, South Africa
    cPanel Access Level:
    Root Administrator
    I am not using a 3rd party script. I merely want to add the IP address into the firewall, as soon as the user adds the IP address in cPanel.
     
  6. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,590
    Likes Received:
    2,186
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @SoftDux,

    You would have to develop a custom script that parses the IP addresses from the output of the Mysql get_host_notes UAPI function and adds them to the CSF whitelist. Then, setup your custom script to run during the post event stage of the Mysql::add_host UAPI function so that your custom script runs anytime someone authorizes a new host to the Remote MySQL option in cPanel. You can read more about setting up standardized hooks on the document below:

    Guide to Standardized Hooks - Hookable Events - Developer Documentation - cPanel Documentation

    If you need help developing the custom script, we provide a list of companies offering system administration services on the link below:

    Guide to Standardized Hooks - Hookable Events - Developer Documentation - cPanel Documentation

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

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