SHOW-ENCRYPT-KEY
Name
SHOW ENCRYPTKEYS
Description
This statement is used to view all custom keys under the database. If the user specifies a database, the system will check that specified database, otherwise it will directly query the database where the current session is located.
The execution of this statement requires ADMIN
privileges on the target database.
Syntax:
SHOW ENCRYPTKEYS [IN|FROM db] [LIKE 'key_pattern']
Parameters:
db
: database name to querykey_pattern
: parameter used to filter key names
Example
mysql> SHOW ENCRYPTKEYS;
+-------------------+-------------------+
| EncryptKey Name | EncryptKey String |
+-------------------+-------------------+
| example_db.my_key | ABCD123456789 |
+-------------------+-------------------+
1 row in set (0.00 sec)
mysql> SHOW ENCRYPTKEYS FROM example_db LIKE "%my%";
+-------------------+-------------------+
| EncryptKey Name | EncryptKey String |
+-------------------+-------------------+
| example_db.my_key | ABCD123456789 |
+-------------------+-------------------+
1 row in set (0.00 sec)
Keywords
SHOW, ENCRYPT, KEY