SHOW-ENCRYPT-KEY

Name

SHOW ENCRYPTKEYS

Description

View all custom keys under the database. If the user specifies a database, check the corresponding database, otherwise directly query the database where the current session is located.

Requires ADMIN privilege on this database

grammar:

  1. SHOW ENCRYPTKEYS [IN|FROM db] [LIKE 'key_pattern']

parameter

db: database name to query key_pattern: parameter used to filter key names

Example

  1. mysql> SHOW ENCRYPTKEYS;
  2. +-------------------+-------------------+
  3. | EncryptKey Name | EncryptKey String |
  4. +-------------------+-------------------+
  5. | example_db.my_key | ABCD123456789 |
  6. +-------------------+-------------------+
  7. 1 row in set (0.00 sec)
  8. mysql> SHOW ENCRYPTKEYS FROM example_db LIKE "%my%";
  9. +-------------------+-------------------+
  10. | EncryptKey Name | EncryptKey String |
  11. +-------------------+-------------------+
  12. | example_db.my_key | ABCD123456789 |
  13. +-------------------+-------------------+
  14. 1 row in set (0.00 sec)

Keywords

  1. SHOW, ENCRYPT, KEY

Best Practice