Creating remote database in Softaculous using ISPConfig API

Discussion in 'Developers' Forum' started by Bhavana, Feb 8, 2020.

  1. Bhavana

    Bhavana New Member


    I am from Softaculous team, A user is using remote database server and it is set as the default database server in ISPConfig.

    We use the ISPConfig API and create object of SoapClient and then use the sites_database_user_add function to create database.
    The following are the parameters passed while creating database:

    $params = array(
    'server_id' => $ispconfig['server_id'],
    'type' => 'mysql',
    'database_name' => $dbname_,
    'database_user_id' => $dbuserid,
    'parent_domain_id' => $domain_id,
    'database_charset' => '',
    'remote_access' => 'n', // n disabled - y enabled
    'active' => 'y', // n disabled - y enabled
    'remote_ips' => $_SERVER['SERVER_ADDR']

    The remote access is disabled by default and we cannot pass it as y to enable it due to security concern. We have passed the server IP as the remote IP to connect to the remote database server but it gives access denied.

    Can you please look into this and let us know how do we pass the server ip as the remote ip in the parameter so that only the server will be able to connect to the default set remote mysql database.
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Remote access must be set to 'y', the server IP that you set restricts access then to this one IP. That's described in the ISPConfig manual btw.
  3. Bhavana

    Bhavana New Member

    Thank you, we have made the required changes accordingly.

Share This Page