MySQL NDB Cluster API Developer Guide  /  ...  /  Single-User Mode Functions

3.2.9 Single-User Mode Functions

The MGM API makes it possible for the programmer to put the cluster into single-user mode—and to return it to normal mode again—from within an application. This section covers the functions that are used for these operations.

ndb_mgm_enter_single_user()

Description

This function is used to enter single-user mode on a given node.

Signature
int ndb_mgm_enter_single_user
    (
      NdbMgmHandle          handle,
      unsigned int          id,
      struct ndb_mgm_reply* reply
    )
Parameters

This function takes 3 parameters:

  • An NdbMgmHandle.

  • The id of the node to be used in single-user mode.

  • A pointer to an ndb_mgm_reply structure, used for a reply message.

Return value

Returns -1 in the event of failure.

ndb_mgm_exit_single_user()

Description

This function is used to exit single-user mode and to return to normal operation.

Signature
int ndb_mgm_exit_single_user
    (
      NdbMgmHandle          handle,
      struct ndb_mgm_reply* reply
    )
Parameters

This function requires 2 arguments:

Return value

Returns -1 in case of an error.