4.5.1.4 mysql Client Server-Side Helpmysql客户端服务器端帮助

mysql> help search_string

If you provide an argument to the help command, mysql uses it as a search string to access server-side help from the contents of the MySQL Reference Manual. 如果为help命令提供参数,mysql会将其用作搜索字符串,以从mysql参考手册的内容中访问服务器端帮助。The proper operation of this command requires that the help tables in the mysql database be initialized with help topic information (see Section 5.1.17, “Server-Side Help Support”).此命令的正确操作要求使用帮助主题信息初始化mysql数据库中的帮助表(请参阅第5.1.17节,“服务器端帮助支持”)。

If there is no match for the search string, the search fails:如果搜索字符串不匹配,则搜索失败:

mysql> help me

Nothing found
Please try to run 'help contents' for a list of all accessible topics

Use help contents to see a list of the help categories:使用帮助内容查看帮助类别列表:

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:
   Account Management
   Administration
   Data Definition
   Data Manipulation
   Data Types
   Functions
   Functions and Modifiers for Use with GROUP BY
   Geographic Features
   Language Structure
   Plugins
   Storage Engines
   Stored Routines
   Table Maintenance
   Transactions
   Triggers

If the search string matches multiple items, mysql shows a list of matching topics:如果搜索字符串匹配多个项目,mysql将显示匹配的主题列表:

mysql> help logs
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 BINARY LOGS
   SHOW ENGINE
   SHOW LOGS

Use a topic as the search string to see the help entry for that topic:使用主题作为搜索字符串来查看该主题的帮助条目:

mysql> help show binary logs
Name: 'SHOW BINARY LOGS'
Description:
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 [purge-binary-logs], that shows how
to determine which logs can be purged.

mysql> SHOW BINARY LOGS;
+---------------+-----------+-----------+
| Log_name      | File_size | Encrypted |
+---------------+-----------+-----------+
| binlog.000015 |    724935 | Yes       |
| binlog.000016 |    733481 | Yes       |
+---------------+-----------+-----------+

The search string can contain the wildcard characters % and _. 搜索字符串可以包含通配符%_These have the same meaning as for pattern-matching operations performed with the LIKE operator. 这些与使用LIKE运算符执行的模式匹配操作具有相同的含义。For example, HELP rep% returns a list of topics that begin with rep:例如,HELP rep%返回以rep开头的主题列表:

mysql> HELP rep%
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:
   REPAIR TABLE
   REPEAT FUNCTION
   REPEAT LOOP
   REPLACE
   REPLACE FUNCTION