SHOW ENCRYPT RULES

    语法

    • 未指定 databaseName 时,默认是当前使用的 DATABASE。 如果也未使用 DATABASE 则会提示 No database selected

    返回值说明

    • 查询指定逻辑库中的数据加密规则
    1. SHOW ENCRYPT RULES FROM encrypt_db;
    1. mysql> SHOW ENCRYPT RULES FROM encrypt_db;
    2. +-----------+--------------+---------------+--------------+-----------------------+-------------------+----------------+-------------------------+---------------------+----------------------+-----------------+------------------+--------------------------+
    3. +-----------+--------------+---------------+--------------+-----------------------+-------------------+----------------+-------------------------+---------------------+----------------------+-----------------+------------------+--------------------------+
    4. | t_user | pwd | pwd_cipher | pwd_plain | | | AES | aes-key-value=123456abc | | | | | true |
    5. | t_encrypt | pwd | pwd_cipher | pwd_plain | | | AES | aes-key-value=123456abc | | | | | true |
    6. 2 rows in set (0.00 sec)
    • 查询当前逻辑库中的数据加密规则
    1. mysql> SHOW ENCRYPT RULES;
    2. +-----------+--------------+---------------+--------------+-----------------------+-------------------+----------------+-------------------------+---------------------+----------------------+-----------------+------------------+--------------------------+
    3. | 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 |
    4. +-----------+--------------+---------------+--------------+-----------------------+-------------------+----------------+-------------------------+---------------------+----------------------+-----------------+------------------+--------------------------+
    5. | t_user | pwd | pwd_cipher | pwd_plain | | | AES | aes-key-value=123456abc | | | | | true |
    6. | t_encrypt | pwd | pwd_cipher | pwd_plain | | | AES | aes-key-value=123456abc | | | | | true |
    7. 2 rows in set (0.00 sec)
    • 查询指定逻辑库中指定的数据加密规则
    1. SHOW ENCRYPT TABLE RULE t_encrypt FROM encrypt_db;
    • 查询当前逻辑库中指定的数据加密规则
    1. SHOW ENCRYPT TABLE RULE t_encrypt;
    1. +-----------+--------------+---------------+--------------+-----------------------+-------------------+----------------+-------------------------+---------------------+----------------------+-----------------+------------------+--------------------------+
    2. | 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 |
    3. +-----------+--------------+---------------+--------------+-----------------------+-------------------+----------------+-------------------------+---------------------+----------------------+-----------------+------------------+--------------------------+
    4. | t_encrypt | pwd | pwd_cipher | pwd_plain | | | AES | aes-key-value=123456abc | | | | | true |
    5. +-----------+--------------+---------------+--------------+-----------------------+-------------------+----------------+-------------------------+---------------------+----------------------+-----------------+------------------+--------------------------+
    6. 1 row in set (0.01 sec)

    保留字