MariaDB starting with 10.0.4

SHUTDOWN command is a new feature in MariaDB 10.0.4

Syntax

SHUTDOWN;

Description

The SHUTDOWN command shuts the server down.

Required permissions

One must have a SHUTDOWN privilege (see GRANT) to use this command. It is the same privilege one needs to use the mysqladmin shutdown command.

Example

The following example shows how to create an event which turns off the server at a certain time:

CREATE EVENT `test`.`shutd`
    ON SCHEDULE
        EVERY 1 DAY
        STARTS '2014-01-01 20:00:00'
    COMMENT 'Shutdown Maria when the office closes'
DO BEGIN
    SHUTDOWN;
END;

Comments

Comments loading...