![background image](http://html1.mh-extra.com/html/oracle/5-0/5-0_reference-manual_16461961226.webp)
Other Administrative Statements
1206
The
FLUSH
statement has several variant forms that clear or reload various internal caches, flush
tables, or acquire locks. To execute
FLUSH
, you must have the
RELOAD
[577]
privilege.
By default, the server writes
FLUSH
statements to the binary log so that they replicate to replication
slaves. To suppress logging, use the optional
NO_WRITE_TO_BINLOG
keyword or its alias
LOCAL
.
Note
FLUSH LOGS
,
FLUSH MASTER
,
FLUSH SLAVE
, and
FLUSH TABLES WITH
READ LOCK
are not written to the binary log in any case because they would
cause problems if replicated to a slave.
The
FLUSH
statement causes an implicit commit. See
Section 13.3.3, “Statements That Cause an
Implicit Commit”
.
The
RESET
statement is similar to
FLUSH
. See
Section 13.7.6.5, “
RESET
Syntax”
, for information about
using the
RESET
statement with replication.
flush_option
can be any of the following items:
•
DES_KEY_FILE
Reloads the DES keys from the file that was specified with the
--des-key-file
[407]
option at
server startup time.
•
HOSTS
Empties the host cache. You should flush the host cache if some of your hosts change IP address
or if the error message
Host 'host_name' is blocked
occurs. (See
Section C.5.2.6,
“
Host 'host_name' is blocked
”
.) When more than
max_connect_errors
[467]
errors occur successively for a given host while connecting to the MySQL server, MySQL
assumes that something is wrong and blocks the host from further connection requests.
Flushing the host cache enables further connection attempts from the host. The default value
of
max_connect_errors
[467]
is 10. To avoid this error message, start the server with
max_connect_errors
[467]
set to a large value.
•
LOGS
Closes and reopens all log files. If binary logging is enabled, the sequence number of the binary log
file is incremented by one relative to the previous file. On Unix, this is the same thing as sending
a
SIGHUP
signal to the
mysqld
server (except on some Mac OS X 10.3 versions where
mysqld
ignores
SIGHUP
and
SIGQUIT
).
If you execute
FLUSH LOGS
and
mysqld
is writing the error log to a file (for example, if it was started
with the
--log-error
[411]
option), log file renaming occurs as described in
Section 5.2.1, “The
Error Log”
.
•
MASTER
Deletes all binary logs, resets the binary log index file and creates a new binary log.
FLUSH MASTER
is deprecated in favor of
RESET MASTER
.
FLUSH MASTER
is still accepted in MySQL 5.0 for
backward compatibility, but is removed in MySQL 5.6. See
Section 13.4.1.2, “
RESET MASTER
Syntax”
.
•
PRIVILEGES
Reloads the privileges from the grant tables in the
mysql
database. On Unix, this also occurs if the
server receives a
SIGHUP
signal.
The server caches information in memory as a result of
GRANT
and
CREATE USER
statements. This
memory is not released by the corresponding
REVOKE
and
DROP USER
statements, so for a server
Содержание 5.0
Страница 1: ...MySQL 5 0 Reference Manual ...
Страница 18: ...xviii ...
Страница 60: ...40 ...
Страница 396: ...376 ...
Страница 578: ...558 ...
Страница 636: ...616 ...
Страница 844: ...824 ...
Страница 1234: ...1214 ...
Страница 1426: ...MySQL Proxy Scripting 1406 The following diagram shows an overview of the classes exposed by MySQL Proxy ...
Страница 1427: ...MySQL Proxy Scripting 1407 ...
Страница 1734: ...1714 ...
Страница 1752: ...1732 ...
Страница 1783: ...Configuring Connector ODBC 1763 ...
Страница 1793: ...Connector ODBC Examples 1773 ...
Страница 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Страница 1842: ...Connector Net Installation 1822 5 Once the installation has been completed click Finish to exit the installer ...
Страница 1864: ...Connector Net Visual Studio Integration 1844 Figure 20 24 Debug Stepping Figure 20 25 Function Stepping 1 of 2 ...
Страница 2850: ...2830 ...
Страница 2854: ...2834 ...
Страница 2928: ...2908 ...
Страница 3000: ...2980 ...
Страница 3122: ...3102 ...
Страница 3126: ...3106 ...
Страница 3174: ...3154 ...
Страница 3232: ...3212 ...