Documentation Home
MySQL 5.7 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 35.6Mb
PDF (A4) - 35.6Mb
PDF (RPM) - 34.6Mb
EPUB - 8.7Mb
HTML Download (TGZ) - 8.4Mb
HTML Download (Zip) - 8.5Mb
HTML Download (RPM) - 7.3Mb
Eclipse Doc Plugin (TGZ) - 9.3Mb
Eclipse Doc Plugin (Zip) - 11.4Mb
Man Pages (TGZ) - 202.2Kb
Man Pages (Zip) - 307.6Kb
Info (Gzip) - 3.3Mb
Info (Zip) - 3.3Mb
Excerpts from this Manual mysql_refresh()

int mysql_refresh(MYSQL *mysql, unsigned int options)


As of MySQL 5.7.11, mysql_refresh() is deprecated and will be removed in a future version of MySQL. Instead, use mysql_query() to execute a FLUSH statement.

This function flushes tables or caches, or resets replication server information. The connected user must have the RELOAD privilege.

The options argument is a bit mask composed from any combination of the following values. Multiple values can be OR'ed together to perform multiple operations with a single call.


    Refresh the grant tables, like FLUSH PRIVILEGES.


    Flush the logs, like FLUSH LOGS.


    Flush the table cache, like FLUSH TABLES.


    Flush the host cache, like FLUSH HOSTS.


    Reset status variables, like FLUSH STATUS.


    Flush the thread cache.


    On a slave replication server, reset the master server information and restart the slave, like RESET SLAVE.


    On a master replication server, remove the binary log files listed in the binary log index and truncate the index file, like RESET MASTER.

Return Values

Zero for success. Nonzero if an error occurred.


User Comments
Sign Up Login You must be logged in to post a comment.