Chapter 37: Controller: /nodeworx/mail/virus Up Part II: NodeWorx API Spec Chapter 39: Controller: /nodeworx/mysql/remote 

38 Controller: /nodeworx/mysql

Required Permissions "MYSQL"
Action: add
Added in version 4.7.0-339
Description Add a new mysql server to the pool.
Warning This action has been deprecated as of version 4.8.0-393. 2011-03-30 Use Ctrl_Nodeworx_MysqlRemote::add
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
Added in version 4.7.0-339
Description 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.7.0-339
Description Sets the default mysql server to use for new SiteWorx accounts and resellers.
Warning This action has been deprecated as of version 4.8.0-393. 2011-03-30 Use Ctrl_Nodeworx_MysqlRemote::default
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.7.0-339
Description Checks if the service is running or not.
Sample output
array (
’status’ => 0,
’payload’ => true,
)
Action: isRunningOnNode
Added in version 4.7.0-339
Description 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
Added in version 4.7.0-339
Description List MySQL servers.
Warning This action has been deprecated as of version 4.8.0-393. 2011-03-30 Use Ctrl_Nodeworx_MysqlRemote::listServers
Sample output
array (
’status’ => 0,
’payload’ =>
array (
0 => ’localhost’,
),
)
Action: listActiveServers
Added in version 4.7.0-339
Description List active MySQL servers.
Warning This action has been deprecated as of version 4.8.0-393. 2011-03-30 Use Ctrl_Nodeworx_MysqlRemote::listActiveServers
Sample output
array (
’status’ => 0,
’payload’ =>
array (
0 => ’localhost’,
),
)
Action: listDeletableServers
Added in version 4.7.0-339
Description List deletable MySQL servers.
Warning This action has been deprecated as of version 4.8.0-393. 2011-03-30 Use Ctrl_Nodeworx_MysqlRemote::listDeletableServers
Sample output
array (
’status’ => 0,
’payload’ =>
array (
),
)
Action: listGeneralName
Added in version 4.7.0-339
Description Lists the "normal" name - ie "web server" instead of "httpd".
Sample output
array (
’status’ => 0,
’payload’ => ’##LG_MYSQLSERVER##’,
)
Action: listInactiveServers
Added in version 4.7.0-339
Description List inactive MySQL servers.
Warning This action has been deprecated as of version 4.8.0-393. 2011-03-30 Use Ctrl_Nodeworx_MysqlRemote::listInactiveServers
Sample output
array (
’status’ => 0,
’payload’ =>
array (
),
)
Action: listPortNumbers
Added in version 4.7.0-339
Description Lists a string of the port numbers that this service uses, comma-seperated.
Sample output
array (
’status’ => 0,
’payload’ => ’3306’,
)
Action: listPortNumbersArray
Added in version 4.7.0-339
Description Lists array of port numbers and ranges that this service uses.
Sample output
array (
’status’ => 0,
’payload’ =>
array (
0 => 3306,
),
)
Action: listRequiredPermissions
Added in version 4.7.0-339
Description Lists an array of permissions required to control the service.
Sample output
array (
’status’ => 0,
’payload’ =>
array (
0 => ’MYSQL’,
),
)
Action: listServiceInfo
Added in version 4.7.0-339
Description Lists the service name, ports, page, and status.
Sample 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.7.0-339
Description Lists the service name - ie "httpd" instead of "web server".
Sample output
array (
’status’ => 0,
’payload’ => ’mysqld’,
)
Action: listServicePage
Added in version 4.7.0-339
Description Lists the page that controls the service.
Sample output
array (
’status’ => 0,
’payload’ => ’/nodeworx/mysql’,
)
Action: nickname
Added in version 4.7.0-339
Description Change a mysql server’s nickname.
Warning This action has been deprecated as of version 4.8.0-393. 2011-03-30 Use Ctrl_Nodeworx_MysqlRemote::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
Added in version 4.7.0-339
Description 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
151
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_open_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 least 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: queryAutoRestart
Added in version 5.1.0-838
Description Displays the information available to the action "autoRestart".
Sample output
array (
’status’ => 0,
’payload’ =>
array (
’autorestart’ => ’0’,
),
)
Action: queryOptions
Added in version 5.1.0-838
Description Displays the information available to the action "options".
Sample output
array (
’status’ => 0,
’payload’ =>
array (
’max_connections’ => ’151’,
’max_connect_errors’ => ’10’,
’connect_timeout’ => ’10’,
’wait_timeout’ => ’28800’,
’key_buffer_size’ => ’8384512’,
’sort_buffer_size’ => ’2097144’,
’read_buffer_size’ => ’131072’,
’max_allowed_packet’ => ’1048576’,
’thread_cache_size’ => ’0’,
’table_open_cache’ => ’64’,
’query_cache_limit’ => ’1048576’,
’query_cache_size’ => ’0’,
),
)
Action: queryProcesses
Added in version 4.8.0-393
Description Query processes on the local mysql server.
Sample output
array (
’status’ => 0,
’payload’ =>
array (
0 =>
array (
’id’ => ’10376’,
’username’ => ’iworx’,
’command’ => ’Sleep’,
’time’ => ’1’,
),
1 =>
array (
’id’ => ’10377’,
’username’ => ’iworx’,
’command’ => ’Query’,
’time’ => ’0’,
),
),
)
Action: restart
Added in version 4.7.0-339
Description 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.7.0-339
Description 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
Added in version 4.7.0-339
Description 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
Added in version 4.7.0-339
Description 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.7.0-339
Description 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
Added in version 4.7.0-339
Description 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.7.0-339
Description 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.7.0-339
Description 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.7.0-339
Description 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
 Chapter 37: Controller: /nodeworx/mail/virus Up Part II: NodeWorx API Spec Chapter 39: Controller: /nodeworx/mysql/remote 

(C) 2017 by InterWorx LLC