For the complete documentation index, see llms.txt. This page is also available as Markdown.

mysql_close

mysql_close terminates an open database connection and releases the memory allocated for the MYSQL handle.

Syntax

void mysql_close(MYSQL * mysql);

Parameter

Description

Closes a previously opened connection and deallocates all memory.

To reuse a connection handle after mysql_close() the handle must be initialized again by mysql_init().

See Also

This page is: Copyright © 2026 MariaDB. All rights reserved.

spinner

Last updated

Was this helpful?