当前位置:网站首页>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';
边栏推荐
- 1807. Replace the parentheses in the string
- The drawing method of side-by-side diagram, multi row and multi column
- Application practice | Shuhai supply chain construction of data center based on Apache Doris
- 283. Moving zero-c and language assisted array method
- Solana链上应用Crema因黑客攻击停运
- 如何实现轻松管理1500万员工?
- Cloudcompare & open3d DBSCAN clustering (non plug-in)
- 抖音实战~评论数量同步更新
- PMO:比较25种分子优化方法的样本效率
- 现在mysql cdc2.1版本在解析值为0000-00-00 00:00:00的datetime类
猜你喜欢
迷失在Mysql的锁世界
Tiktok actual combat ~ the number of comments is updated synchronously
QT - double buffer plot
DevEco Device Tool 3.0 Release带来5大能力升级,让智能设备开发更高效
How is the entered query SQL statement executed?
保证接口数据安全的10种方案
卷积神经网络模型之——LeNet网络结构与代码实现
【米哈游2023届秋招】开启【校招唯一专属内推码EYTUC】
gtest从一无所知到熟练使用(3)什么是test suite和test case
bizchart+slider实现分组柱状图
随机推荐
【C语言进阶篇】数组&&指针&&数组笔试题
The use of complex numbers in number theory and geometry - Cao Zexian
PMO:比较25种分子优化方法的样本效率
ApacheCN 翻译、校对、笔记整理活动进度公告 2022.7
PostgreSQLSQL高级技巧透视表
GTEST from ignorance to proficiency (4) how to write unit tests with GTEST
Scala download and configuration
[acwing] solution of the 58th weekly match
Visual task scheduling & drag and drop | scalph data integration based on Apache seatunnel
1807. 替换字符串中的括号内容
The drawing method of side-by-side diagram, multi row and multi column
虚拟人产业面临的挑战
开户哪家券商比较好?网上开户安全吗
HUAWEI nova 10系列发布 华为应用市场筑牢应用安全防火墙
odps 中 对表进行了一次备份,为什么在元数据库查m_table 时,两张表的逻辑大小不一致,但数
删库不必跑路!详解 MySQL 数据恢复
并发优化总结
复数在数论、几何中的用途 - 曹则贤
现在mysql cdc2.1版本在解析值为0000-00-00 00:00:00的datetime类
How can the advertising system of large factories be upgraded without the presence of large models