Documentation Home
MySQL NDB Cluster API Developer Guide
Download this Manual ndb_mgm_set_connectstring()

Description.  This function is used to set the connection string for a management server connection to a node.


int ndb_mgm_set_connectstring
      NdbMgmHandle handle,
      const char*  connection_string

Parameters.  ndb_mgm_set_connectstring() takes two parameters:

  • A management server handle.

  • A connection_string whose format is shown here:

    connection_string :=

    ndb_mgm_get_connectstring() also uses this format for connection strings.

    It is possible to establish connections with multiple management servers using a single connection string.

    nodeid-specification := nodeid=id
    host-specification := host[:port]

    id, port, and host are defined as follows:

    • id: An integer greater than 0 identifying a node in config.ini.

    • port: An integer referring to a standard Unix port.

    • host: A string containing a valid network host address.

Return value.  This function returns -1 in the event of failure.