Documentation Home
MySQL 8.0 C API Developer Guide
Download this Manual
PDF (US Ltr) - 1.2Mb
PDF (A4) - 1.2Mb
HTML Download (TGZ) - 158.8Kb
HTML Download (Zip) - 190.0Kb


7.77 mysql_shutdown()

int
mysql_shutdown(MYSQL *mysql,
               enum mysql_enum_shutdown_level shutdown_level)

Description

Note

mysql_shutdown() is deprecated and will be removed in a future version of MySQL. Instead, use mysql_query() to execute a SHUTDOWN statement.

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 to SHUTDOWN_DEFAULT. Dynamically linked executables that have been compiled with older versions of the libmysqlclient headers and call mysql_shutdown() must be used with the old libmysqlclient dynamic library.

An alternative to mysql_shutdown() is to use the SHUTDOWN SQL statement.

The shutdown process is described in The Server Shutdown Process.

Return Values

Zero for success. Nonzero if an error occurred.

Errors