MySQL 9.4 C API Developer Guide / ... / C API Basic Interface / C API Basic Function Descriptions / mysql_close()
voidmysql_close(MYSQL *mysql) Closes a previously opened connection.mysql_close() also deallocates the connection handler pointed to bymysql if the handler was allocated automatically bymysql_init() ormysql_connect(). Do not use the handler after it has been closed.