| Bug #119471 | "Bad handshake" during each connection to a replication source server | ||
|---|---|---|---|
| Submitted: | 27 Nov 2025 17:03 | ||
| Reporter: | action mystique | Email Updates: | |
| Status: | Open | Impact on me: | |
| Category: | MySQL Server: Connection Handling | Severity: | S2 (Serious) |
| Version: | 8.4.7 | OS: | Ubuntu (25.10 questing) |
| Assigned to: | CPU Architecture: | x86 (64 bits) | |
[27 Nov 2025 17:03]
action mystique
[25 Jan 9:56]
Daniël van Eeden
> I find it strange that the replica sends a login request with an **empty** username despite being correctly configured for the replication with a non-empty source username. The SSL Handshake is described here: https://dev.mysql.com/doc/dev/mysql-server/latest/page_protocol_connection_phase.html#sect... The login with empty username you see is a Protocol::SSLRequest and is documented here: https://dev.mysql.com/doc/dev/mysql-server/latest/page_protocol_connection_phase_packets_p... So basically what happens is this: < Client (replica) connects over TCP, without TLS > S → C Server Greeting S ← C Login Request (Protocol::SSLRequest) No username, connection attributes, etc < Now the TLS handshake happens > S → C Server Greeting S ← C Login Request (Protocol::HandshakeResponse41, with username etc) < conversation continues > Note that Wireshark can decode TLS traffic. For this it needs to be configured with the private key. For Diffie-Hellman based algorithms it will need the session key. So best to avoid those. See also Bug #80709 You may want to: - Try what happens without TLS if that is acceptable for a short time. - Configure Wireshark to decode TLS (https://wiki.wireshark.org/TLS, https://databaseblog.myname.nl/2014/07/decoding-encrypted-mysql-traffic-with.html). Use TLSv1.2 with AES256-SHA or something similar. - Inspect the logs - Try to reproduce this on a test setup, so it is easier to share the pcap and TLS credentials, etc. Note: What MySQL calls SSL is TLS, MySQL never supported SSL.
[25 Jan 9:59]
Daniël van Eeden
I think the TLS part might not be the problem here. Can you share more information about: - The exact version of the primary and replica - The exact CHANGE REPLICATION SOURCE TO statement (but without the actual password) - Any logging and output that might be helpful
