Description

This function authorizes a remote host to access a cPanel account's MySQL® users.

Examples


$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
$allow_remotehost = $cpanel->api1('Mysql','addhost', array('remote.example.com') ); // Call the function.

my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
my $allow_remotehost = $cpliveapi->api1('Mysql','addhost', ['remote.example.com'] ); # Call the function.

<cpanel Module="Mysql::addhost($FORM('hostname'))">
cpapi1 --user=username Mysql addhost remote.example.com

This function does not return output.

Parameters

ParameterTypeDescriptionPossible valuesExample
hostnamestring

Required

The hostname or IP address.

A valid domain name or IP address.
remote.example.com

Returns

This function does not return output.