Skip to content

Comment: 20 bytes of random data #193

@zhenjl

Description

@zhenjl

This is not a bug. Just a quick comment about a comment here: https://github.com/go-sql-driver/mysql/blob/master/packets.go#L177

The reason the python library uses 12 bytes is because in MySQL 4.1 the initial handshake packet sends back 20 bytes of random data. The first 8 are in the earlier part of the packet, then the remaining 12 bytes are in this later section.

Documentation is here: http://dev.mysql.com/doc/internals/en/secure-password-authentication.html#packet-Authentication::Native41

You may know that already but just in case...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions