Skip to content

Connection Phase ->Initial Handshake->Client Response Format Mismatch Caused MySQL Handshake Failure #1636

Closed
@bugsos

Description

@bugsos

Issue description

During the MySQL connection handshake phase, the format of the client's response did not comply with the server's handshake message requirements, resulting in a handshake failure.

although server handshake packet CLIENT_CONNECT_ATTRS not set,but client still responded with the connection sttributes content.
mysql

Example code

https://github.com/go-sql-driver/mysql/blob/master/packets.go#L264
https://github.com/go-sql-driver/mysql/blob/master/packets.go#L385

Error log

[mysql]  packets.go:37: unexpected EOF
[error] failed to initialize database, got error invalid connection
[error] fortest/mysql.go:57     invalid connection

Configuration

Driver version: v1.8.0

Go version: go1.22.4 linux/amd64

Server version: MySQL 5.6.24

Server OS: CentosOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions