mysql icon indicating copy to clipboard operation
mysql copied to clipboard

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

Open bugsos opened this issue 4 months ago • 0 comments

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

bugsos avatar Oct 10 '24 03:10 bugsos