文件首頁
MySQL 9.0 參考手冊
相關文件 下載本手冊
PDF (US Ltr) - 40.0Mb
PDF (A4) - 40.1Mb
Man Pages (TGZ) - 258.2Kb
Man Pages (Zip) - 365.3Kb
Info (Gzip) - 4.0Mb
Info (Zip) - 4.0Mb


MySQL 9.0 參考手冊  /  ...  /  mysql 客戶端伺服器端說明

6.5.1.4 mysql 客戶端伺服器端說明

mysql> help search_string

如果您為 help 命令提供引數,mysql 會將其作為搜尋字串,從 MySQL 參考手冊的內容中存取伺服器端說明。此命令的正確操作需要使用說明主題資訊初始化 mysql 資料庫中的說明表格(請參閱第 7.1.17 節,「伺服器端說明支援」)。

如果搜尋字串沒有相符項目,則搜尋失敗

mysql> help me

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

使用 help contents 查看說明類別的清單

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

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

搜尋字串可以包含萬用字元 %_。它們的含義與使用 LIKE 運算子執行的模式比對操作相同。例如,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