Connection failed, denied access to mysql db

Access denied for user ‘user’ @ ‘localhost’ (using password: YES) error when testing connection on MYSQL database

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
[09:23:54.059] Trying to connect to jdbc:mysql://localhost/leavemanagementsystem?useSSL=false&allowMultiQueries=true
[09:23:58.120] Connection failed
Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
[09:24:38.621] Trying to connect to jdbc:mysql://localhost/leavemanagementsystem?useSSL=false&allowMultiQueries=true
[09:24:39.616] Connection failed
Access denied for user 'cuba'@'localhost' (using password: YES)
[09:27:56.299] Trying to connect to jdbc:mysql://localhost/leavemanagementsystem?useSSL=false&allowMultiQueries=true