重庆思庄Oracle、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 2799|回复: 0
打印 上一主题 下一主题

mysql用户密码加密方式

[复制链接]
跳转到指定楼层
楼主
发表于 2014-11-10 10:32:29 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
 用户加密一直是一个比较重要的问题。如果加密不好。会造成黑客攻击。
配置文件的加密选项:
#default-authentication-plugin=mysql_native_password
#default-authentication-plugin=mysql_old_password
#default-authentication-plugin=sha256_password
命令行配置:
set old_password=0   /* mysql_native_password*/
set old_password=1   /* mysql_old_password */
set old_password=2  /* sha256_password */
三种加密方式。

创建用户的时候使用加密选项:


Create the account and specify that it authenticates using the sha256_password plugin:
CREATE USER 'sha256user'@'localhost' IDENTIFIED WITH sha256_password;
2. Set the old_passwords system variable to 2 to cause the PASSWORD() function to use SHA-256
hashing of password strings, then set the account password:
SET old_passwords = 2;
SET PASSWORD FOR 'sha256user'@'localhost' = PASSWORD('Sh@256Pa33');

但是由于加密过长。不会成功。
[此贴子已经被作者于2014-11-10 10:52:18编辑过]
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2024-5-3 00:37 , Processed in 0.091157 second(s), 20 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表