SHOW ENCRYPTKEYS
Description
Syntax
SHOW ENCRYPTKEYS [IN|FROM db] [LIKE 'key_pattern']
Parameters
db
: the name of the database to querykey_pattern
: parameter used to filter key names
View all custom keys under the database. If the user specifies a database, then view the corresponding database, otherwise query the current session’s database directly.
You need to have ADMIN
privileges for this database.
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)
keyword
SHOW,ENCRYPTKEYS