The mysql program can access server-side help. That is, you can perform lookups in the MySQL Reference Manual for a particular topic, right from the mysql> prompt. The general syntax for accessing server-side help is HELP keyword. To display the topmost entries of the help system, use the contents keyword: mysql> HELP contents; You asked for help about help category: "Contents" For more information, type 'help <item>', where <item> is one of the following categories: Administration Column Types Data Definition Data Manipulation Functions Geographic features Transactions You need not step through the items listed in the contents list to get help on a specific subject. Suppose that you need to know how to get status information from the server, but can't remember the command. Typing in the following command yields some hints: mysql> HELP STATUS; Many help items for your request exist To make a more specific request, please type 'help <item>', where <item> is one of the following topics: SHOW SHOW MASTER STATUS SHOW SLAVE STATUS To get the more specific information offered, use the HELP command with the SHOW keyword: mysql> HELP SHOW; Name: 'SHOW' Description: SHOW has many forms that provide information about databases, tables, columns, or status information about the server. This section describes those following: SHOW [FULL] COLUMNS FROM tbl_name [FROM db_name] [LIKE 'pattern'] SHOW CREATE DATABASE db_name SHOW CREATE TABLE tbl_name SHOW DATABASES [LIKE 'pattern'] SHOW [STORAGE] ENGINES SHOW ERRORS [LIMIT [offset,] row_count] SHOW GRANTS FOR user SHOW INDEX FROM tbl_name [FROM db_name] SHOW INNODB STATUS SHOW [BDB] LOGS SHOW PRIVILEGES SHOW [FULL] PROCESSLIST SHOW STATUS [LIKE 'pattern'] SHOW TABLE STATUS [FROM db_name] [LIKE 'pattern'] SHOW [OPEN] TABLES [FROM db_name] [LIKE 'pattern'] SHOW [GLOBAL | SESSION] VARIABLES [LIKE 'pattern'] SHOW WARNINGS [LIMIT [offset,] row_count] The SHOW statement also has forms that provide information about replication master and slave servers and are described in [Replication SQL]: SHOW BINLOG EVENTS SHOW MASTER LOGS SHOW MASTER STATUS SHOW SLAVE HOSTS SHOW SLAVE STATUS If the syntax for a given SHOW statement includes a LIKE 'pattern' part, 'pattern' is a string that can contain the SQL '%' and '_" wildcard characters. The pattern is useful for restricting statement output to matching values. Server-side help requires the help tables in the mysql database to be loaded, but normally these files will be loaded by default unless you install MySQL by compiling it yourself. |