Exception in thread “main” java.sql.SQLException: Access denied for user ”@’localhost’ (using password: NO)

Your eclipse is running the class “com.mysql.cj.jdbc.admin.TimezoneDump” (which also contain a main method) instead of your MainApp class.

Try this manipulation:

Right click on MainApp.java -> Run As -> Java Application

Leave a Comment