# mysql\_shutdown

## Syntax

```c
int mysql_shutdown(MYSQL * mysql,
  enum mysql_enum_shutdown_level);
```

* `mysql` - a mysql handle, which was previously allocated by [mysql\_init()](mysql_init) or [mysql\_real\_connect()](mysql_real_connect).
* `mysql_enum_shutdown_level` - currently only one shutdown level, `SHUTDOWN_DEFAULT` is supported.

## Description

Sends a shutdown message to the server. To shut down the database server, the user for the current connection must have `SHUTDOWN` privileges.

Returns zero on success, non-zero on failure.

## See also

* [mysql\_kill()](mysql_kill)

{% @marketo/form formId="4316" %}
