mysql_options
mysql_options sets extra connection options on a MYSQL handle before calling mysql_real_connect. Deprecated since Connector/C 3.0 — use mysql_optionsv instead.
Syntax
int mysql_options(MYSQL * mysql,
enum mysql_option,
const void * arg);Parameters
mysql- a mysql handle, which was previously allocated by mysql_init() or mysql_real_connect().mysql_option- the option you want to set. See description below.arg- the value for the option.
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() and before mysql_real_connect().
Return Value
Returns zero on success, non zero if an error occurred (invalid option or value).
This function is deprecated as of MariaDB Connector/C 3.0 and will be removed in future releases. It's preferable to use mysql_optionsv.
Options
See mysql_optionsv.
See Also
This page is: Copyright © 2026 MariaDB. All rights reserved.
Last updated
Was this helpful?

