SHOW ENCRYPTKEYS

Description

Syntax

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

Parameters

db: the name of the database to query key_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

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

keyword

  1. SHOW,ENCRYPTKEYS