文章来源于网络收集而来,版权归原创者所有,如有侵权请及时联系!
数据加密
定义
SHOW ENCRYPT RULES [FROM schemaName]
SHOW ENCRYPT TABLE RULE tableName [from schemaName]
- 支持查询所有的数据加密规则和指定逻辑表名查询
说明
列 | 说明 |
---|---|
table | 逻辑表名 |
logicColumn | 逻辑列名 |
cipherColumn | 密文列名 |
plainColumn | 明文列名 |
encryptorType | 加密算法类型 |
encryptorProps | 加密算法参数 |
示例
显示加密规则
mysql> show encrypt rules from encrypt_db;
+-----------+-------------+--------------+-------------+---------------+-------------------------+
| table | logicColumn | cipherColumn | plainColumn | encryptorType | encryptorProps |
+-----------+-------------+--------------+-------------+---------------+-------------------------+
| t_encrypt | order_id | order_cipher | NULL | MD5 | |
| t_encrypt | user_id | user_cipher | user_plain | AES | aes-key-value=123456abc |
| t_order | item_id | order_cipher | NULL | MD5 | |
| t_order | order_id | user_cipher | user_plain | AES | aes-key-value=123456abc |
+-----------+-------------+--------------+-------------+---------------+-------------------------+
4 rows in set (0.01 sec)
显示加密表规则表名
mysql> show encrypt table rule t_encrypt;
+-----------+-------------+--------------+-------------+---------------+-------------------------+
| table | logicColumn | cipherColumn | plainColumn | encryptorType | encryptorProps |
+-----------+-------------+--------------+-------------+---------------+-------------------------+
| t_encrypt | order_id | order_cipher | NULL | MD5 | |
| t_encrypt | user_id | user_cipher | user_plain | AES | aes-key-value=123456abc |
+-----------+-------------+--------------+-------------+---------------+-------------------------+
2 rows in set (0.00 sec)
mysql> show encrypt table rule t_encrypt from encrypt_db;
+-----------+-------------+--------------+-------------+---------------+-------------------------+
| table | logicColumn | cipherColumn | plainColumn | encryptorType | encryptorProps |
+-----------+-------------+--------------+-------------+---------------+-------------------------+
| t_encrypt | order_id | order_cipher | NULL | MD5 | |
| t_encrypt | user_id | user_cipher | user_plain | AES | aes-key-value=123456abc |
+-----------+-------------+--------------+-------------+---------------+-------------------------+
2 rows in set (0.00 sec)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论