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

mysql_refresh

Syntax

int mysql_refresh(MYSQL * mysql,
  unsigned int options);

Description

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

OptionDescription
REFRESH_GRANTRefresh grant tables.
REFRESH_LOGFlush logs.
REFRESH_TABLESFlush table cache.
REFRESH_HOSTSFlush host cache.
REFRESH_STATUSReset status variables.
REFRESH_THREADSFlush thread cache.
REFRESH_SLAVEReset master server information and restart slaves.
REFRESH_MASTERRemove binary log files.
REFRESH_READ_LOCK
REFRESH_FAST

Returns zero on success, otherwise non zero.

To combine different values in the options parameter use the OR operator '|'. The function mysql_reload() is an alias for mysql_refresh().

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.