Skip to content

Commit

Permalink
Add Auth Plugin Name to for native password auth to fix Azure connect…
Browse files Browse the repository at this point in the history
…ions

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.
  • Loading branch information
redcape committed Jan 16, 2021
1 parent b4aaed2 commit a0a65cd
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ public byte[] toByteArray() throws IOException {
if (schema != null) {
buffer.writeZeroTerminatedString(schema);
}
buffer.writeZeroTerminatedString("mysql_native_password");
return buffer.toByteArray();
}

Expand Down

0 comments on commit a0a65cd

Please sign in to comment.