---
name: "mysql_set_server_option"
section: "3"
platform: "linux"
package: "mariadb"
version: "13.0.2-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/mysql_set_server_option"
---

# mysql\_set\_server\_option(3)

### Name

mysql\_set\_server\_option - Sets server option

### Synopsis

-

  ```
  #include <mysql.h>
  int mysql_set_server_option(MYSQL * mysql,
                              enum enum_mysql_set_option);
  ```

### Description

Sets server option.

### Parameters

- •

  `mysql` - a mysql handle, which was previously allocated by **[mysql\_init(3)](/mysql_init/3.md)** and connected by **[mysql\_real\_connect(3)](/mysql_real_connect/3.md)**.

- •

  `enum_mysql_set_option` - server option (see below) 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 |

### Return value

Returns zero on success, non-zero on failure.

### See also

- •

  **[mysql\_real\_connect(3)](/mysql_real_connect/3.md)**
