support mysql 8.4 (#5231)

This commit is contained in:
TK337
2024-08-29 12:43:06 +08:00
committed by GitHub
parent b2b3223d1d
commit 7e31b40531
3 changed files with 35 additions and 9 deletions

View File

@@ -293,7 +293,7 @@ public class MysqlConnector {
encryptedPassword = getPassword().getBytes();
header = authSwitchAfterAuth(encryptedPassword, header);
body = PacketManager.readBytes(channel, header.getPacketBodyLength(), timeout);
} else if ("mysql_native_password".equals(pluginName)) {
} else if (pluginName == null || "mysql_native_password".equals(pluginName)) {
try {
encryptedPassword = MySQLPasswordEncrypter.scramble411(getPassword().getBytes(), authData);
} catch (NoSuchAlgorithmException e) {