How to change mysql jar version?

There is an error “java.sql.SQLNonTransientConnectionException: CLIENT_PLUGIN_AUTH is required” when connecting to the MySQL database. I suspected that the version of com.mysql.cj_.0.17.jar is too high, but I don’t know how to change the version. Please guide me