MySQL 8.4 發行說明
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