Name

Msql::shutdown

Synopsis

$result = $db->shutdown;

Msql::shutdown sends a shutdown command to the mSQL server. The command is sent as the user is running the program. Thus, to work in a CGI program, the program must be run as a user with the right to shutdown the database. The function returns -1 on failure and on success.

Example

use Msql;
my $db = Msql->connect;
# Time to shutdown the database...
my $result = $db->shutdown;
die "Command failed!" if $result == -1;
print "The server has been stopped.\n";

Get MySQL and mSQL now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.