I had a similar problem, but the differemce was: I didn't executed my JavaApp from localhost
, but from a remote PC. So I got something like java.sql.SQLException: Access denied for user 'root'@'a.remote.ip.adress' (using password: YES)
To solve this, you can simply login to phpMyAdmin, go to Users
, click add user
and enter the host from which you want to execute your JavaApp (or choose Any Host
)