文件首頁
MySQL 8.4 參考手冊
相關文件 下載本手冊
PDF (美式信紙) - 39.9Mb
PDF (A4) - 40.0Mb
Man Pages (TGZ) - 258.5Kb
Man Pages (Zip) - 365.5Kb
Info (Gzip) - 4.0Mb
Info (Zip) - 4.0Mb


MySQL 8.4 參考手冊  /  ...  /  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