/*****************************************************************************

The main idea is that no password are sent between client & server on

connection and that no password are saved in mysql in a decodable form.

On connection a random string is generated and sent to the client.

The client generates a new string with a random generator inited with

the hash values from the password and the sent string.

This 'check' string is sent to the server where it is compared with

a string generated from the stored hash_value of the password and the

random string.

The password is saved (in user.password) by using the PASSWORD() function in

mysql.

This is .c file because it's used in libmysqlclient, which is entirely in C.

(we need it to be portable to a variety of systems).   Example:

update user set password=PASSWORD("hello") where user="test"

This saves a hashed number as a string in the password field.

The new authentication is performed in following manner:

  SERVER: public_seed=create_random_string()

        send(public_seed)

  CLIENT:  recv(public_seed)

        hash_stage1=sha1("password")

        hash_stage2=sha1(hash_stage1)

        reply=xor(hash_stage1, sha1(public_seed,hash_stage2)

   // this three steps are done in scramble()

    send(reply)

   SERVER:  recv(reply)

        hash_stage1=xor(reply, sha1(public_seed,hash_stage2))

        candidate_hash2=sha1(hash_stage1)

        check(candidate_hash2==hash_stage2)

  // this three steps are done in check_scramble()

*****************************************************************************/

PASSWORD MySQL 5.6.21-1ubuntu14.04_amd64的更多相关文章

  1. 【MySQL】-NO.21.MySQL.1.MySQL.1.001-【Install MySQL5.7 On Windows】

    1.0.0 Summary Tittle:[MySQL]-NO.21.MySQL.1.MySQL.1.001-[Install MySQL5.7 On Windows] Style:Web Serie ...

  2. Centos7.4 安装MySQL 5.7.21 (通用二进制包)

    1.下载安装包 MySQL 官方下载地址:https://dev.mysql.com/downloads/mysql/ MySQL 5.7官方安装文档:https://dev.mysql.com/do ...

  3. Mysql 5.7.21 设置主从库同步

    主从复制条件: Mysql 单机多实例安装参考Mysql 5.7.21 设置主从库同步 下面的操作是多实例主从复制,3306为主库,3307为从库. 主库要开启log-bin,主库和从库的server ...

  4. CentOS下编译安装MySQL 5.6.21

    一.编译安装MySQL前的准备工作 安装编译源码所需的工具和库 yum install gcc gcc-c++ ncurses-devel perl 安装cmake:http://www.cnblog ...

  5. mysql 5.7.21 解压版安装配置方法图文教程

    引用:https://www.jb51.net/article/140951.htm 1.首先,你要下载MySQL解压版,下载地址,图解: 2.解压安装包,根据自己的喜好选择路径,我选择的路径是C:\ ...

  6. 推荐mysql优化的21条经验

    1. 为查询缓存优化你的查询 大多数的MySQL服务器都开启了查询缓存.这是提高性最有效的方法之一,而且这是被MySQL的数据库引擎处理的.当有很多相同的查询被执行了多次的时候,这 1. 为查询缓存优 ...

  7. Mysql re-set password, mysql set encode utf8 mysql重置密码,mysql设置存储编码格式

    There is a link about how to re-set password. http://database.51cto.com/art/201010/229528.htm words ...

  8. linux 安装MySql 5.7.21 操作步骤

    一:到mysql官网下载最新的mysql包 mysql-5.7.21-linux-glibc2.12-x86_64 https://dev.mysql.com/downloads/mysql/ 二:在 ...

  9. MySql入门(2-1)windows下安装mysql的两种方式

    一.下载mysql 1.下载解压MySQL 登录oracle主页,需要用户名和口令: lshengqi@netease.com/1wsx**** 下载路径:: https://dev.mysql.co ...

随机推荐

  1. npm发布插件步骤

    开发好一个插件后,要想让其他人也能使用该插件需要将插件发布到npm上,具体步骤如下: 1.添加npm用户: npm adduser Username: your name Password: your ...

  2. python基础整理7——爬虫——爬虫开发工具

    HTTP代理神器Fiddler Fiddler是一款强大Web调试工具,它能记录所有客户端和服务器的HTTP请求. Fiddler启动的时候,默认IE的代理设为了127.0.0.1:8888,而其他浏 ...

  3. 初识Qt文件下载

    1.新建一个Qt Gui应用,项目名称为http,基类选择为QMainWindow,类名设置为MainWindow. 2.在http.pro文件中的QT  += core gui后添加\ networ ...

  4. python+requests实现接口测试 - cookies的使用

    在很多时候,发送请求后,服务端会对发送请求方进行身份识别,如果请求中缺少识别信息或存在错误的识别信息, 会造成识别失败. 如一些需要用户登录以后才能访问的页面. import requests mya ...

  5. MySQL(一)索引的创建和删除

    索引是存储引擎用于快速找到记录的一种数据结构,这是索引的基本功能. 索引对于良好的性能非常关键.尤其是当表中的数据量越来越大时,索引对性能的影响愈发重要.接下来将讲述如何创建.查看和删除索引. 索引分 ...

  6. P3133 [USACO16JAN]无线电联系Radio Contact

    题目描述 Farmer John has lost his favorite cow bell, and Bessie the cow has agreed to help him find it! ...

  7. RHEL 7.6 安装 Oracle 18c RAC

    RHEL 7.6 安装 Oracle 18c RAC 第一部分 安装规划 虚拟环境 VirtualBox 6.0 OS 版本 Red Hat Enterprise Linux Server relea ...

  8. snapkit更新约束崩溃的问题

    最近在使用snapkit布局时,竟然发现更新约束会导致崩溃,为什么这样呢? checkButton.snp.makeConstraints { (make) in make.left.top.equa ...

  9. IOS马甲包(诚招大量开发)

    马甲包的字面意思给产品穿马甲,但是我认为马甲包更像是产品的一种分身,一种和产品一样拥有灵魂,拥有肉身的一种分身.它能为产品带来同样的功能效果. 一.什么是马甲包通过技术手段,多次上架同一款产品的方法. ...

  10. 笔记2:MYSQL 表操作

    一.表约束 1.非空约束:not null 作用:定义表的某一列不能为空. >> alter table 表名 modify 列名 int not null; "添加非空约束&q ...