mysql\_refresh(3) MariaDB Connector/C mysql\_refresh(3)

## [Name](#Name)

mysql\_refresh - flushes information on the server

## [Synopsis](#Synopsis)

```
#include <mysql.h>
int mysql_refresh(MYSQL * mysql, unsigned int options);
    
```

## [Description](#Description)

Flushes different types of information stored on the server. The bit-masked parameter options specify which kind of information will be flushed.

## [Parameters](#Parameters)

•

mysql - a mysql handle, which was previously allocated by [**mysql\_init(3)**](/man/enterprise-packages/mariadb-12.0/mysql_init.3) and connected by [**mysql\_real\_connect(3)**](/man/enterprise-packages/mariadb-12.0/mysql_real_connect.3).

•

options - a bit masked composed integer. See below.

options can be any combination of the following flags:

Option Description REFRESH\_GRANT Refresh grant tables. REFRESH\_LOG Flush logs. REFRESH\_TABLES Flush table cache. REFRESH\_HOSTS Flush host cache. REFRESH\_STATUS Reset status variables. REFRESH\_THREADS Flush thread cache. REFRESH\_SLAVE Reset master server information and restart slaves. REFRESH\_MASTER Remove binary log files.

## [Notes](#Notes)

•

To combine different values in the options parameter use the OR operator \`|'.

•

mysql\_reload() is an alias for mysql\_refresh().

## [Return value](#Return_value)

Returns zero on success, otherwise non zero.

Version 3.4

---

Document: mysql_refresh(3) from mariadb-12.0 12.0.2-r5 (Chainguard OS)
