MySQL 5.6 C API Developer Guide
void mysql_close(MYSQL *mysql)
Closes a previously opened connection.
mysql_close()
also deallocates
the connection handler pointed to by mysql
if the handler was allocated automatically by
mysql_init()
or
mysql_connect()
. Do not use
the handler after it has been closed.