SHOW
Syntax
1174
SHOW SLAVE STATUS
SHOW PROFILE [
types
] [FOR QUERY
n
] [OFFSET
n
] [LIMIT
n
]
SHOW PROFILES
SHOW [GLOBAL | SESSION] STATUS [
like_or_where
]
SHOW TABLE STATUS [FROM
db_name
] [
like_or_where
]
SHOW [FULL] TABLES [FROM
db_name
] [
like_or_where
]
SHOW TRIGGERS [FROM
db_name
] [
like_or_where
]
SHOW [GLOBAL | SESSION] VARIABLES [
like_or_where
]
SHOW WARNINGS [LIMIT [
offset
,]
row_count
]
like_or_where
:
LIKE '
pattern
'
| WHERE
expr
If the syntax for a given
SHOW
statement includes a
LIKE 'pattern'
[896]
part,
'pattern'
is a
string that can contain the SQL “
%
” and “
_
” wildcard characters. The pattern is useful for restricting
statement output to matching values.
Several
SHOW
statements also accept a
WHERE
clause that provides more flexibility in specifying which
rows to display. See
Section 19.18, “Extensions to
SHOW
Statements”
.
Many MySQL APIs (such as PHP) enable you to treat the result returned from a
SHOW
statement
as you would a result set from a
SELECT
; see
Chapter 20, Connectors and APIs
, or your API
documentation for more information. In addition, you can work in SQL with results from queries on
tables in the
INFORMATION_SCHEMA
database, which you cannot easily do with results from
SHOW
statements. See
Chapter 19,
INFORMATION_SCHEMA
Tables
.
13.7.5.1.
SHOW BINARY LOGS
Syntax
SHOW BINARY LOGS
SHOW MASTER LOGS
Lists the binary log files on the server. This statement is used as part of the procedure described in
Section 13.4.1.1, “
PURGE BINARY LOGS
Syntax”
, that shows how to determine which logs can be
purged.
mysql>
SHOW BINARY LOGS;
+---------------+-----------+
| Log_name | File_size |
+---------------+-----------+
| binlog.000015 | 724935 |
| binlog.000016 | 733481 |
+---------------+-----------+
SHOW MASTER LOGS
is equivalent to
SHOW BINARY LOGS
. The
File_size
column is displayed as
of MySQL 5.0.7.
You must have the
SUPER
[578]
privilege to use this statement.
13.7.5.2.
SHOW BINLOG EVENTS
Syntax
SHOW BINLOG EVENTS
[IN '
log_name
'] [FROM
pos
] [LIMIT [
offset
,]
row_count
]
Shows the events in the binary log. If you do not specify
'log_name'
, the first binary log is displayed.
The
LIMIT
clause has the same syntax as for the
SELECT
statement. See
Section 13.2.8, “
SELECT
Syntax”
.
Note
Issuing a
SHOW BINLOG EVENTS
with no
LIMIT
clause could start a very time-
and resource-consuming process because the server returns to the client the
complete contents of the binary log (which includes all statements executed by
the server that modify data). As an alternative to
SHOW BINLOG EVENTS
, use
the
mysqlbinlog
utility to save the binary log to a text file for later examination
Summary of Contents for 5.0
Page 1: ...MySQL 5 0 Reference Manual ...
Page 18: ...xviii ...
Page 60: ...40 ...
Page 396: ...376 ...
Page 578: ...558 ...
Page 636: ...616 ...
Page 844: ...824 ...
Page 1234: ...1214 ...
Page 1427: ...MySQL Proxy Scripting 1407 ...
Page 1734: ...1714 ...
Page 1752: ...1732 ...
Page 1783: ...Configuring Connector ODBC 1763 ...
Page 1793: ...Connector ODBC Examples 1773 ...
Page 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Page 2850: ...2830 ...
Page 2854: ...2834 ...
Page 2928: ...2908 ...
Page 3000: ...2980 ...
Page 3122: ...3102 ...
Page 3126: ...3106 ...
Page 3174: ...3154 ...
Page 3232: ...3212 ...