mysql_shutdown — Shutdowns the database server
int mysql_shutdown(MYSQL * mysql,
enum mysql_enum_shutdown_level);Sends a shutdown message to the server.
Parameters
mysqlA mysql handle, which was previously allocated by mysql_init() or mysql_real_connect().
mysql_enum_shutdown_levelCurrently only one shutdown level, SHUTDOWN_DEFAULT is supported.
Return value
Zero on success, non-zero on failure.
![[Note]](note.png) | |
|---|
To shutdown the database server, the user for the current connection must have SHUTDOWN privileges |