MySQL :: MySQL 8.4 C API Developer Guide :: 5.4.80 mysql_shutdown() (original) (raw)

5.4.80 mysql_shutdown()

int
mysql_shutdown(MYSQL *mysql,
               enum mysql_enum_shutdown_level shutdown_level)

Description

Asks the database server to shut down. The connected user must have the SHUTDOWN privilege. MySQL servers support only one type of shutdown;shutdown_level must be equal toSHUTDOWN_DEFAULT. Dynamically linked executables that have been compiled with older versions of thelibmysqlclient headers and callmysql_shutdown() must be used with the old libmysqlclient dynamic library.

An alternative tomysql_shutdown() is to use theSHUTDOWN SQL statement.

The shutdown process is described inThe Server Shutdown Process.

Return Values

Zero for success. Nonzero if an error occurred.

Errors