Skip to content

Commit a0a65cd

Browse files
committed
Add Auth Plugin Name to for native password auth to fix Azure connections
PLUGIN_AUTH is listed as one of the capabilities and connections to Azure MySQL require the Auth Plugin Name to be specified when that capability is present. If it is not there, Azure MySQL instances respond with "The connection string may not be right. Please visit portal for references.". See https://dev.mysql.com/doc/internals/en/connection-phase-packets.html#packet-Protocol::HandshakeResponse and osheroff#26 for more details about the investigation.
1 parent b4aaed2 commit a0a65cd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main/java/com/github/shyiko/mysql/binlog/network/protocol/command/AuthenticateSecurityPasswordCommand.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ public byte[] toByteArray() throws IOException {
7777
if (schema != null) {
7878
buffer.writeZeroTerminatedString(schema);
7979
}
80+
buffer.writeZeroTerminatedString("mysql_native_password");
8081
return buffer.toByteArray();
8182
}
8283

0 commit comments

Comments
 (0)