SHOW ENCRYPT RULES
Syntax
- When
databaseName
is not specified, then DATABASE
is currently used as the default name. If DATABASE
is not used, you will receive a No database selected
prompt.
Return value description
- Query encrypt rules for specified database.
SHOW ENCRYPT RULES FROM encrypt_db;
mysql> SHOW ENCRYPT RULES FROM encrypt_db;
+-----------+--------------+---------------+--------------+-----------------------+-------------------+----------------+-------------------------+---------------------+----------------------+-----------------+------------------+--------------------------+
+-----------+--------------+---------------+--------------+-----------------------+-------------------+----------------+-------------------------+---------------------+----------------------+-----------------+------------------+--------------------------+
| t_user | pwd | pwd_cipher | pwd_plain | | | AES | aes-key-value=123456abc | | | | | true |
| t_encrypt | pwd | pwd_cipher | pwd_plain | | | AES | aes-key-value=123456abc | | | | | true |
2 rows in set (0.00 sec)
- Query encrypt rules for current database.
mysql> SHOW ENCRYPT RULES;
+-----------+--------------+---------------+--------------+-----------------------+-------------------+----------------+-------------------------+---------------------+----------------------+-----------------+------------------+--------------------------+
| table | logic_column | cipher_column | plain_column | assisted_query_column | like_query_column | encryptor_type | encryptor_props | assisted_query_type | assisted_query_props | like_query_type | like_query_props | query_with_cipher_column |
+-----------+--------------+---------------+--------------+-----------------------+-------------------+----------------+-------------------------+---------------------+----------------------+-----------------+------------------+--------------------------+
| t_user | pwd | pwd_cipher | pwd_plain | | | AES | aes-key-value=123456abc | | | | | true |
| t_encrypt | pwd | pwd_cipher | pwd_plain | | | AES | aes-key-value=123456abc | | | | | true |
2 rows in set (0.00 sec)
- Query specified encrypt rule in specified database.
SHOW ENCRYPT TABLE RULE t_encrypt FROM encrypt_db;
- Query specified encrypt rule in current database.
SHOW ENCRYPT TABLE RULE t_encrypt;
+-----------+--------------+---------------+--------------+-----------------------+-------------------+----------------+-------------------------+---------------------+----------------------+-----------------+------------------+--------------------------+
| table | logic_column | cipher_column | plain_column | assisted_query_column | like_query_column | encryptor_type | encryptor_props | assisted_query_type | assisted_query_props | like_query_type | like_query_props | query_with_cipher_column |
+-----------+--------------+---------------+--------------+-----------------------+-------------------+----------------+-------------------------+---------------------+----------------------+-----------------+------------------+--------------------------+
| t_encrypt | pwd | pwd_cipher | pwd_plain | | | AES | aes-key-value=123456abc | | | | | true |
+-----------+--------------+---------------+--------------+-----------------------+-------------------+----------------+-------------------------+---------------------+----------------------+-----------------+------------------+--------------------------+
1 row in set (0.01 sec)
Reserved word