While connecting to Cloudsql DB via auth proxy from java application I am getting below error.
Caused by: java.sql.SQLException: SSL connection required for plugin "mysql_clear_password". Check if 'sslMode' is enabled.
Not able to get through mysql docs the correct value to be set.
Has anyone faced similar issue ?
Below is the code for reference:
String jdbcURL = String.format("jdbc:mysql://127.0.0.1:3306/%s", DB_NAME);
Properties connProps = new Properties();
connProps.setProperty("user", DB_USER);
connProps.setProperty("password", DB_PASSWORD);
connProps.setProperty("cloudSqlInstance", CONNECTION_NAME);
connProps.setProperty("authenticationPlugins ", "com.mysql.jdbc.authentication.MysqlClearPasswordPlugin");
HikariConfig config = new HikariConfig();
config.setJdbcUrl(jdbcURL);