Remote Database Access Hosts via terminal possible?

gazibosension

Registered
Jun 30, 2014
1
0
1
cPanel Access Level
Website Owner
Hi,
i would like to know if anyone knows how to add "Remote MySQL -> Remote Database Access Hosts" via terminal if there is any cpanel script that does that which i can use outside of WHM or somewhere i can edit in order to add IP address to the list of allowed access.

thanks.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,222
463
Hello :)

You will not be able to manually add the entries via the command line unless you have root access to modify the MySQL users table where these grants are stored. However, you could develop a script that utilizes our API for authorizing a host. The specific function is documented here:

MysqlFE::authorizehost

Thank you.