Controller: Mysql

API Controller /nodeworx/mysql
Required Permissions ["MYSQL"]
Action Description
add Add a new mysql server to the pool. DEPRECATED in version 4.8.0-393
autoRestart Set the mysql server auto-restart status.
default Sets the default mysql server to use for new SiteWorx accounts and resellers. DEPRECATED in version 4.8.0-393
isRunning Checks if the service is running or not.
isRunningOnNode Checks if the service is running on a specific node (Clustering only).
list List MySQL servers. DEPRECATED in version 4.8.0-393
listActiveServers List active MySQL servers. DEPRECATED in version 4.8.0-393
listDeletableServers List deletable MySQL servers. DEPRECATED in version 4.8.0-393
listGeneralName Lists the "normal" name - ie "web server" instead of "httpd".
listInactiveServers List inactive MySQL servers. DEPRECATED in version 4.8.0-393
listPortNumbers Lists a string of the port numbers that this service uses, comma-seperated.
listPortNumbersArray Lists array of port numbers and ranges that this service uses.
listRequiredPermissions Lists an array of permissions required to control the service.
listServiceInfo Lists the service name, ports, page, and status.
listServiceName Lists the service name - ie "httpd" instead of "web server".
listServicePage Lists the page that controls the service.
nickname Change a mysql server's nickname. DEPRECATED in version 4.8.0-393
options Configure various mysql service options.
queryProcesses Query processes on the local mysql server.
restart Restarts the service.
restartOnNode Restarts the service on a specific node (Clustering only).
rootpass Change the given MySQL Server's root password.
rrdGraph Set the mysql server connections RRD graph display status.
start Starts the service.
startOnBoot Set the mysql server start-on-boot-status.
startOnNode Starts the service on a specific node (Clustering only).
stop Stops the service.
stopOnNode Stops the service on a specific node (Clustering only).

Action: add

This action has been deprecated as of version 4.8.0-393.

MESSAGE: 2011-03-30 Use Ctrl_Nodeworx_MysqlRemote::add

Add a new mysql server to the pool.

Input Parameters

Name Type Notes Required?
nickname string Yes
host string
Help Entry
Enter the host or IP address (with port if needed) of the database server.
Yes
root_username string
Help Entry
The root username of the MySQL Server. Note: this is *not* the system root username.
Yes
root_password string
Help Entry
The root password of the MySQL Server. Note: this is *not* the system root password.
Yes

Action: autoRestart

Set the mysql server auto-restart status.

Input Parameters

Name Type Notes Required?
autorestart integer
Help Entry
With this option on you can have MySQL restarted automatically if MySQL goes down unexpectedly
Example Values
1, 0
Example Default Value
0
No*
cascade_to_nodes integer
Help Entry
Selecting this option causes the action to be replayed on all nodes of the cluster automatically, as if you had logged in to each node manually
Example Values
1
No
* indicates that it's actually required, but probably already has a valid default value

Action: default (Added in version 4.3.0-290)

This action has been deprecated as of version 4.8.0-393.

MESSAGE: 2011-03-30 Use Ctrl_Nodeworx_MysqlRemote::default

Sets the default mysql server to use for new SiteWorx accounts and resellers.

Input Parameters

Name Type Notes Required?
server string
Help Entry
Select the database server from the list that you would like to use.
Example Values
localhost
Yes

Action: isRunning (Added in version 4.2.0-260)

Checks if the service is running or not.

Example Output

array (
  'status' => 0,
  'payload' => true,
)

Action: isRunningOnNode (Added in version 4.3.0-290)

Checks if the service is running on a specific node (Clustering only).

Input Parameters

Name Type Notes Required?
node_id string No*
* indicates that it's actually required, but probably already has a valid default value

Action: list

This action has been deprecated as of version 4.8.0-393.

MESSAGE: 2011-03-30 Use Ctrl_Nodeworx_MysqlRemote::listServers

List MySQL servers.

Example Output

array (
  'status' => 0,
  'payload' => 
  array (
    0 => 'localhost',
  ),
)

Action: listActiveServers

This action has been deprecated as of version 4.8.0-393.

MESSAGE: 2011-03-30 Use Ctrl_Nodeworx_MysqlRemote::listActiveServers

List active MySQL servers.

Example Output

array (
  'status' => 0,
  'payload' => 
  array (
    0 => 'localhost',
  ),
)

Action: listDeletableServers

This action has been deprecated as of version 4.8.0-393.

MESSAGE: 2011-03-30 Use Ctrl_Nodeworx_MysqlRemote::listDeletableServers

List deletable MySQL servers.

Example Output

array (
  'status' => 0,
  'payload' => 
  array (
  ),
)

Action: listGeneralName (Added in version 4.2.0-260)

Lists the "normal" name - ie "web server" instead of "httpd".

Example Output

array (
  'status' => 0,
  'payload' => '##LG_MYSQLSERVER##',
)

Action: listInactiveServers

This action has been deprecated as of version 4.8.0-393.

MESSAGE: 2011-03-30 Use Ctrl_Nodeworx_MysqlRemote::listInactiveServers

List inactive MySQL servers.

Example Output

array (
  'status' => 0,
  'payload' => 
  array (
  ),
)

Action: listPortNumbers (Added in version 4.2.0-260)

Lists a string of the port numbers that this service uses, comma-seperated.

Example Output

array (
  'status' => 0,
  'payload' => '3306',
)

Action: listPortNumbersArray (Added in version 4.2.0-260)

Lists array of port numbers and ranges that this service uses.

Example Output

array (
  'status' => 0,
  'payload' => 
  array (
    0 => 3306,
  ),
)

Action: listRequiredPermissions (Added in version 4.2.0-260)

Lists an array of permissions required to control the service.

Example Output

array (
  'status' => 0,
  'payload' => 
  array (
    0 => 'MYSQL',
  ),
)

Action: listServiceInfo (Added in version 4.2.0-260)

Lists the service name, ports, page, and status.

Example Output

array (
  'status' => 0,
  'payload' => 
  array (
    'id' => 'mysqld',
    'name' => '##LG_MYSQLSERVER##',
    'ports' => '3306',
    'page' => '/nodeworx/mysql',
    'ctrl' => '/nodeworx/mysql',
    'is_running' => 1,
  ),
)

Action: listServiceName (Added in version 4.2.0-260)

Lists the service name - ie "httpd" instead of "web server".

Example Output

array (
  'status' => 0,
  'payload' => 'mysqld',
)

Action: listServicePage (Added in version 4.2.0-260)

Lists the page that controls the service.

Example Output

array (
  'status' => 0,
  'payload' => '/nodeworx/mysql',
)

Action: nickname

This action has been deprecated as of version 4.8.0-393.

MESSAGE: 2011-03-30 Use Ctrl_Nodeworx_MysqlRemote::nickname

Change a mysql server's nickname.

Input Parameters

Name Type Notes Required?
server string
Help Entry
Select the database server from the list that you would like to use.
Example Values
localhost
Yes

Action: options

Configure various mysql service options.

Input Parameters

Name Type Notes Required?
max_connections integer
Help Entry
The number of connections to the MySQL server allowed at once.
Example Default Value
100
No*
max_connect_errors integer
Help Entry
If set, the server blocks further connections from a remote host when the number of interrupted connections from that host exceeds this number. You can unblock a host with the command FLUSH HOSTS.
Example Default Value
10
No*
connect_timeout integer
Description
In Seconds
Help Entry
The number in seconds of MySQL connection timeout. This is also used for the first answer from the server.
Example Default Value
10
No*
wait_timeout integer
Description
In Seconds
Help Entry
The number of seconds the server waits for activity on a connection before closing it.
Example Default Value
28800
No*
key_buffer_size integer
Description
In Bytes
Help Entry
This is the memory buffer shared by all threads. Other buffers used by the server are allocated as needed.
Example Default Value
8384512
No*
sort_buffer_size integer
Description
In Bytes
Help Entry
The size of the buffer used when sorting table data. The default value is 1MB. This option is available only for isamchk.
Example Default Value
2097144
No*
read_buffer_size integer
Description
In Bytes
Help Entry
The size of the buffer used to store data being read from files. The default value is 260KB. This option is available only for isamchk.
Example Default Value
131072
No*
max_allowed_packet integer
Description
In Bytes
Help Entry
Set the maximum packet length to send to or receive from the server. The default value is 16MB.
Example Default Value
1048576
No*
thread_cache_size integer
Help Entry
The number of open tables for all threads. Increasing this value increases the number of file descriptors that mysqld requires.
Example Default Value
0
No*
table_cache integer
Help Entry
Set the number of open tables cached. Table cache is related to max connections. For example, for 200 concurrent running connections, you should have a table cache of at leat 200 * N, where N is the maximum number of tables in a join. You also need to reserve some extra file descriptors for temporary tables and files.
Example Default Value
64
No*
query_cache_limit integer
Description
In Bytes
Help Entry
Set the maximum size of individual query results that can be cached. The default value is 1MB.
Example Default Value
1048576
No*
query_cache_size integer
Description
In Bytes
Help Entry
Set the size of the query cache. Setting it to 0 disables the query cache. The default cache size is 0.
Example Default Value
0
No*
cascade_to_nodes integer
Help Entry
Selecting this option causes the action to be replayed on all nodes of the cluster automatically, as if you had logged in to each node manually
Example Values
1
No
* indicates that it's actually required, but probably already has a valid default value

Action: queryProcesses (Added in version 4.8.0-393)

Query processes on the local mysql server.

Example Output

array (
  'status' => 0,
  'payload' => 
  array (
    0 => 
    array (
      'id' => '45822',
      'username' => 'iworx',
      'command' => 'Sleep',
      'time' => '2',
    ),
    1 => 
    array (
      'id' => '45836',
      'username' => 'iworx',
      'command' => 'Query',
      'time' => '0',
    ),
  ),
)

Action: restart (Added in version 4.2.0-260)

Restarts the service.

Input Parameters

Name Type Notes Required?
cascade_to_nodes integer
Help Entry
Selecting this option causes the action to be replayed on all nodes of the cluster automatically, as if you had logged in to each node manually
Example Values
1
No

Action: restartOnNode (Added in version 4.3.0-290)

Restarts the service on a specific node (Clustering only).

Input Parameters

Name Type Notes Required?
node_id string No*
* indicates that it's actually required, but probably already has a valid default value

Action: rootpass

Change the given MySQL Server's root password.

Input Parameters

Name Type Notes Required?
password string Yes
confirm_password string
Help Entry
Confirm the password field by providing it again. Must match the password provided.
Yes

Action: rrdGraph

Set the mysql server connections RRD graph display status.

Input Parameters

Name Type Notes Required?
rrd integer
Help Entry
Use the dropdown to turn the MySQL server activity graph on or off.
Example Values
1, 0
Example Default Value
0
No*
* indicates that it's actually required, but probably already has a valid default value

Action: start (Added in version 4.2.0-260)

Starts the service.

Input Parameters

Name Type Notes Required?
cascade_to_nodes integer
Help Entry
Selecting this option causes the action to be replayed on all nodes of the cluster automatically, as if you had logged in to each node manually
Example Values
1
No

Action: startOnBoot

Set the mysql server start-on-boot-status.

Input Parameters

Name Type Notes Required?
startonboot integer
Help Entry
If set to 'Yes', MySQL will be automatically started when the server starts up
Example Values
1, 0
Example Default Value
1
No*
cascade_to_nodes integer
Help Entry
Selecting this option causes the action to be replayed on all nodes of the cluster automatically, as if you had logged in to each node manually
Example Values
1
No
* indicates that it's actually required, but probably already has a valid default value

Action: startOnNode (Added in version 4.3.0-290)

Starts the service on a specific node (Clustering only).

Input Parameters

Name Type Notes Required?
node_id string No*
* indicates that it's actually required, but probably already has a valid default value

Action: stop (Added in version 4.2.0-260)

Stops the service.

Input Parameters

Name Type Notes Required?
cascade_to_nodes integer
Help Entry
Selecting this option causes the action to be replayed on all nodes of the cluster automatically, as if you had logged in to each node manually
Example Values
1
No

Action: stopOnNode (Added in version 4.3.0-290)

Stops the service on a specific node (Clustering only).

Input Parameters

Name Type Notes Required?
node_id string No*
* indicates that it's actually required, but probably already has a valid default value