|
Namemysql_optionsv - Used to set extra connect options and affect behavior of a connectionSynopsis
DescriptionUsed to set extra connect options and affect behavior for a connection. This function may be called multiple times to set several options. mysql_optionsv() should be called after mysql_init(3).OptionsThe following table shows which variable type to use for each option.
Command(s) which will be executed when connecting and reconnecting to the server.
Use the compressed protocol for client server communication. If the server doesn’t support compressed protocol, the default protocol will be used.
Connect timeout in seconds. This value will be passed as an unsigned ##int## parameter.
Enable or disable the use of LOAD DATA LOCAL INFILE
For Windows operating systems only: Use named pipes for client/server communication.
Specifies a callback function which will be able to visualize the progress of certain long running statements (i.e. LOAD DATA LOCAL INFILE or ALTER TABLE). The callback function must be defined as followed:
Specify the type of client/server protocol. Possible values are: MYSQL_PROTOCOL_TCP, MYSQL_PROTOCOL_SOCKET, MYSQL_PROTOCOL_PIPE and MYSQL_PROTOCOL_MEMORY.
Enable or disable automatic reconnect.
Specifies the timeout in seconds for reading packets from the server.
Specifies the timeout in seconds for sending packets to the server.
Read options from named configuration file. To read from default my.cnf configuration file, a NULL pointer has to be passed with option MYSQL_READ_DEFAULT_GROUP. Note: MariaDB Connector/C will not read the configuration by default. If MYSQL_READ_DEFAULT_FILE is specified the following sections will be always processed:
Read options from the named group from [[configuring-mariadb-with-mycnf|my.cnf]] or the file specified with MYSQL_READ_DEFAULT_FILE.
Enable or disable reporting data truncation errors for prepared statements.
Specify the network interface from which to connect to MariaDB Server.
Specify the location of client plugins.
Specify stack size for non blocking operations. The argument for MYSQL_OPT_NONBLOCK is the size of the stack used to save the state of a non-blocking operation while it is waiting for I/O and the application is doing other processing. Normally, applications will not have to change this, and it can be passed as zero to use the default value.
Specify the name of a connection handler plugin.
Bundle user data to the current connection, e.g. for use in connection handler plugins. This option requires 4 parameters: connection, option, key and value:
This option is used by connection handler plugins and indicates that the current connection will be used for read operations only.
If this option is set, the client indicates that it will be able to handle expired passwords by setting the CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS capability flag. If the password has expired and CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS is set, the server will not return an error when connecting, but put the connection in sandbox mode, where all commands will return error 1820 (ER_MUST_CHANGE_PASSWORD) unless a new password was set. This option was added in MariaDB Connector/C 3.0.4 TLS/SSL and Security options
Specify the name of a key for a secure connection. If the key is protected with a passphrase, the passphrase needs to be specified with MARIADB_OPT_PASSPHRASE option.
Specify the name of a certificate for a secure connection.
Specify the name of a file which contains one or more trusted CAs.
Specify the path which contains trusted CAs.
Specify one or more (SSLv3, TLSv1.0 or TLSv1.2) cipher suites for TLS encryption. Even if Connector/C supports TLSv1.3 protocol, it is not possible yet to specify TLSv1.3 cipher suites.
Specify a file with a certificate revocation list.
Specify a directory with contains files with certificate revocation lists.
Specify the SHA1 fingerprint of a server certificate for validation during the TLS handshake.
Specify a file which contains one or more SHA1 fingerprints of server certificates for validation during the TLS handshake.
Specify a passphrase for a passphrase protected client key.
Enable (or disable) the verification of the hostname against common name (CN) of the server’s host certificate.
Specifies the name of the file which contains the RSA public key of the database server. The format of this file must be in PEM format. This option is used by the caching_sha2_password plugin and was added in Connector/C 3.1.0
This option is not in use anymore. Connection AttributesConnection attributes are stored in the session_connect_attrs and session_account_connect_attrsPerformance Schema tables. By default, MariaDB Connector/C sends the following connection attributes to the server: * _client_name: always “libmariadb” * _client_version: version of MariaDB Connector/C * _os: operation system * _pid: process id * _platform: e.g. x86 or x64 * _server_host: the hostname (as specified in mysql_real_connect). This attribute was added in Connector/C 3.0.5Note: If the Performance Schema is disabled, connection attributes will not be stored on server.
Deletes a connection attribute for the given key.
Adds a key/value pair to connection attributes.
Clears the current list of connection attributes. See Alsomysql_init(3) mysql_real_connect(3)
Visit the GSP FreeBSD Man Page Interface. |