# mysql\_set\_server\_option

## Syntax

```c
int mysql_set_server_option(MYSQL * mysql,
  enum enum_mysql_set_option);
```

* `mysql` - a mysql handle, which was previously allocated by [mysql\_init()](/docs/connectors/mariadb-connector-c/api-functions/mysql_init.md) or [mysql\_real\_connect()](/docs/connectors/mariadb-connector-c/api-functions/mysql_real_connect.md).
* `enum_mysql_set_option` - server option (see below)

## Description

Server option, which can be one of the following values:

| Option                              | Description                      |
| ----------------------------------- | -------------------------------- |
| `MYSQL_OPTION_MULTI_STATEMENTS_OFF` | Disables multi statement support |
| `MYSQL_OPTION_MULTI_STATEMENTS_ON`  | Enable multi statement support   |

Returns zero on success, non-zero on failure.

## See also

* [mysql\_real\_connect()](/docs/connectors/mariadb-connector-c/api-functions/mysql_real_connect.md)

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mariadb.com/docs/connectors/mariadb-connector-c/api-functions/mysql_set_server_option.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
