#### 4.5.1.4 mysql客户端服务器端帮助

```
mysql> help search_string
```

如果您向`帮助`命令，[**mysql**](mysql.html)使用它作为搜索字符串从 MySQL 参考手册的内容中访问服务器端帮助。该命令的正确操作需要在帮助表中`mysql`使用帮助主题信息初始化数据库（请参阅[第 5.1.17 节，“服务器端帮助支持”](server-side-help-support.html)）。

如果搜索字符串不匹配，则搜索失败：

```
mysql> help me

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

采用[**帮助内容**](help.html)查看帮助类别列表：

```
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
```

如果搜索字符串匹配多个项目，[**mysql**](mysql.html)显示匹配主题的列表：

```
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
```

使用主题作为搜索字符串来查看该主题的帮助条目：

```
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       |
+---------------+-----------+-----------+
```

搜索字符串可以包含通配符`%`和`_`.这些与使用[`喜欢`](string-comparison-functions.html#operator_like)操作员。例如，`帮助代表%`返回以开头的主题列表`代表`：

```
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
```
