当前位置:网站首页>MySQL storage data encryption
MySQL storage data encryption
2022-07-04 22:13:00 【CodingSir】
There are two mainstream encryption methods
ENCODE And DECODE
# Build a test sheet
create table users(
username varchar(128), # The user nickname
password blob # password
) engine=innodb default charset=utf8;
# Insert a test statement
INSERT INTO users (username, password) VALUES ('john', ENCODE('guessme', 'salt'));
commit;
# Inquire about john Password ( With mysql workbench)
select t.username, DECODE(t.password,'salt') as password from users t where t.username = 'john';
# In the query structure password Value up , Right click ,'open value in viewer'. You can see text TAB Password plaintext under .
AES_ENCRYPT And AES_DECRYPT
The security level of this encryption method is better than encode high , It has been deprecated in the new version of the database encode And decode.
# The test table , Also use users
# Insert a statement
INSERT INTO users (username, password) VALUES ('steven', aes_encrypt('password', 'salt'));
commit;
# Inquire about steven Password ( With mysql workbench)
select t.username, aes_decrypt(t.password,'salt') as password from users t where t.username = 'steven';
边栏推荐
- 国产数据库乱象
- 面试题 01.01. 判定字符是否唯一
- GTEST from ignorance to proficient use (2) what is test fixture
- Éducation à la transmission du savoir | Comment passer à un test logiciel pour l'un des postes les mieux rémunérés sur Internet? (joindre la Feuille de route pour l'apprentissage des tests logiciels)
- el-tree结合el-table,树形添加修改操作
- Energy momentum: how to achieve carbon neutralization in the power industry?
- Relational database
- GTEST from ignorance to proficiency (4) how to write unit tests with GTEST
- NAACL-22 | 在基于Prompt的文本生成任务上引入迁移学习的设置
- 迷失在Mysql的锁世界
猜你喜欢

Bookmark

湘江鲲鹏加入昇腾万里伙伴计划,与华为续写合作新篇章

机器学习笔记 - 互信息Mutual Information

i. Mx6ull driver development | 24 - platform based driver model lights LED
【米哈游2023届秋招】开启【校招唯一专属内推码EYTUC】

能源势动:电力行业的碳中和该如何实现?

Why do you have to be familiar with industry and enterprise business when doing Bi development?

Sorting and sharing of selected papers, systems and applications related to the most comprehensive mixed expert (MOE) model in history

TCP协议三次握手过程

How is the entered query SQL statement executed?
随机推荐
如何实现轻松管理1500万员工?
迷失在Mysql的锁世界
Is it safe to open an account in the stock of Caicai college? Can you only open an account by digging money?
[advanced C language] array & pointer & array written test questions
Scala下载和配置
[optimtool.unconstrained] unconstrained optimization toolbox
The use of complex numbers in number theory and geometry - Cao Zexian
Why do you have to be familiar with industry and enterprise business when doing Bi development?
bizchart+slider实现分组柱状图
NAACL-22 | 在基于Prompt的文本生成任务上引入迁移学习的设置
文件读取写入
关系型数据库
Why should garment enterprises talk about informatization?
并列图的画法,多排多列
做BI开发,为什么一定要熟悉行业和企业业务?
VIM from dislike to dependence (23) -- the last gossip
力扣3_383. 赎金信
嵌入式开发:技巧和窍门——提高嵌入式软件代码质量的7个技巧
Tiktok actual combat ~ the number of comments is updated synchronously
el-tree结合el-table,树形添加修改操作