This is a read-only copy of the MariaDB Knowledgebase generated on 2024-11-24. For the latest, interactive version please visit https://mariadb.com/kb/.

mariadb_reconnect

Syntax

my_bool  mariadb_reconnect(MYSQL * mysql)

Description

mariadb_reconnect() tries to reconnect to a server in case the connection died due to timeout or other errors. It uses the same credentials which were specified in mysql_real_connect().

The function will return 0 on sucess.

The function will return an error, if the option MYSQL_OPT_RECONNECT wasn't specified before.

This function was added in Connector/C 3.0.

See also

Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.