Which script allows remote MySQL access?
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
-
Hi @SoftDux You can use the API as follows: UAPI Functions - Mysql::add_host - Developer Documentation - cPanel Documentation But there's no specific script, as you're referencing, the IP address needs to be added to the firewall manually. 0 -
Hi @SoftDux a collection of API calls including this one are run when you do this from the UI. I can't tell you the specific actions taken beyond running this as they're compiled in a perl module. If you're using a 3rd party script you might be able to create a standardized hook for this action: Guide to Standardized Hooks - Hookable Events - Developer Documentation - cPanel Documentation 0 -
Hello @SoftDux, You would have to develop a custom script that parses the IP addresses from the output 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 Thank you. 0
Please sign in to leave a comment.
Comments
5 comments