PHP mysqli refresh() Function

❮ PHP mysqli Reference


Definition and Usage

The refresh() / mysqli_refresh() function refreshes/flushes tables or caches, or resets the replication server information.


Syntax

Object oriented style:

$mysqli -> refresh(options)

Procedural style:

mysqli_refresh(connection, options)

Parameter Values

Parameter Description
connection Required. Specifies the MySQL connection to use
options The options to refresh. Can be one of more of the following (separated by OR):
  • MYSQLI_REFRESH_GRANT - Refreshes the grant tables
  • MYSQLI_REFRESH_LOG - Flushes the logs
  • MYSQLI_REFRESH_TABLES - Flushes the table cache
  • MYSQLI_REFRESH_HOSTS - Flushes the host cache
  • MYSQLI_REFRESH_STATUS - Resets the status variables
  • MYSQLI_REFRESH_THREADS - Flushes the thread cache
  • MYSQLI_REFRESH_SLAVE - Resets the master server info, and restarts the slave
  • MYSQLI_REFRESH_MASTER - Removes the binary log files in the binary log index, and truncates the index file

Technical Details

Return Value: TRUE on success. FALSE on failure
PHP Version: 5.3+

❮ PHP mysqli Reference
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.