MySQL REST Service provides the functions shown in the next table. More detailed information about each function is provided in the list following the table.
These functions cannot be invoked from a stored function, trigger,
or other server substatement, and can only be invoked from
SELECT.
The account invoking these functions must have the
MYSQL_REST_SERVICE_ADMIN privilege,
including when connected as root.
Table 7.14 MySQL REST Service Functions
| Name | Description |
|---|---|
mysql_rest_service_restart() |
Restarts the REST Service backend, asynchronously. |
mysql_rest_service_start() |
Starts the REST Service backend, asynchronously. |
mysql_rest_service_stop() |
Stops the REST Service backend, synchronously. |
You can monitor lifecycle operations triggered by these functions
with SHOW GLOBAL STATUS LIKE
'mysql_rest_service.state';.
Restarts the MySQL REST Service backend, asynchronously. Returns 0 if the immediate operation succeeds. Failures raise an error. A return value of 0 from restart means that restart was accepted, it does not mean that the state reached
READY.Starts the MySQL REST Service backend, asynchronously. Returns 0 if the immediate operation succeeds. Failures raise an error. A return value of 0 from start means that startup was accepted, it does not mean that the state reached
READY.Stops the MySQL REST Service backend, synchronously. Returns 0 if backend shutdown succeeds and the state reaches
STOPPED. Failures raise an error.