---
name: "mysql_options4"
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_options4"
---

# mysql\_options4(3)

### Name

mysql\_options4 - Used to set extra connect options and affect behavior of a connection

### Synopsis

-

  ```
  #include <mysql.h>
  int mysql_options4(MYSQL * mysql,
                    enum mysql_option,
                    const void * arg1,
                    const void * arg2);
  ```

### Description

Used to set extra connect options and affect behavior for a connection. This function may be called multiple times to set several options. `mysql_options()` should be called after **[mysql\_init(3)](/mysql_init/3.md)**.

### Notes

This function is deprecated, new implementations should use **[mysql\_optionsv(3)](/mysql_optionsv/3.md)** api function instead.

### Options

An overview of the possible options can be found in the description of the **[mysql\_optionsv(3)](/mysql_optionsv/3.md)** API function.

### See Also

***[mysql\_init(3)](/mysql_init/3.md)*** **[mysql\_optionsv(3)](/mysql_optionsv/3.md)** \***[mysql\_real\_connect(3)](/mysql_real_connect/3.md)**
