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

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. Day1 Mybatis初识(一)

    框架 将重复的,繁琐的代码实现封装,让程序员将更多的精力放在业务的理解和分析上. 框架的作用 提高开发效率 隐藏细节 三大框架SSH  -->   SSM 1)        表述层:   用户 ...

  2. cascade rcnn论文总结

    1.bouding box regression总结: rcnn使用l2-loss 首先明确l2-loss的计算规则: L∗=(f∗(P)−G∗)2,∗代表x,y,w,h    整个loss : L= ...

  3. C#动态加载/卸载Assembly的解决方案

    1.  Assembly中的类要从MarshalByRefObject继承,如果你想从你自己的类来继承,那么请选用interface或者继续研究其他解决方案. namespace Library { ...

  4. 关于CodePlex

    CodePlex是微软的开源工程网站,涉及诸多微软最新技术的开源工程. 网址:http://www.codeplex.com/ 应常去看看.

  5. vue实现分页

    效果图: html页面: data数据: 方法: 计算属性: 样式: html代码: <!--分页--> <div class="page-bar"> &l ...

  6. koa2实现简单的图片上传

    1.安装koa-body 2.引入koa-body const koa = require('koa'); const fs = require('fs'); const koaBody = requ ...

  7. 腾讯云centos7.2安装mysql5.7

    一.查看是否安装mysql rpm -qa | grep mysql 什么都没显示,说明没有安装 二.进入到opt目录下,使用wget下载官方yum源的rpm包 cd /opt wget https: ...

  8. Nivo Slider用法

    示例代码: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF ...

  9. 利用js编写一个简单的html表单验证,验证通过时提交数据(附源码)

    <!DOCTYPE html> <html lang="en"> <head>     <meta charset="UTF-8 ...

  10. Sql server 查看锁和Kill 死锁进程

    死锁的概念 死锁就是两个或多个会话(SPID)相互请求对方持有的锁资源,导致循环等待的情况.下面两种方法都是用来粗暴的解决死锁的. # 已知阻塞进程ID KILL ID SELECT blocking ...