If change MySQL JDBC driver from 5.1.38
to 6.0.2
I get the following exception
java.sql.SQLNonTransientConnectionException: CLIENT_PLUG
It seems new versions of mysql connector (from 6 on) are not compatible with old version of the DBMS mysql(below 5.6). So in order to solve your problem, if you make an update of mysql connector, try to do the same with the DBMS. Actually I had the same issu with mysql connector 8.0.13 and the DBMS msql 5.1.... I solved it by moving the DBMS to 5.6.17