Reconnect to a PAM_LDAP account in mysqld will cause below error:
java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.sql.SQLNonTransientConnectionException: Could not connect to HostAddress
. PAM authentication request multiple passwords, but 'password2' is not set
First connect is okay, and queries can run, etc.
If a reconnect fails, things will work if restart the DB client used so that DB client connects to mysqld first time again after restart.
The JDBC driver has been tested using multiple DB client apps (ie: Squirrel SQL, SQL Workbench/J) & effect is the same.
JDBC drivers that can reproduce this problem are of below versions:
Drivers of below version are okay (initial connect & multiple subsequent reconnects are all ok):