I have tried various options I got from Google but unable to set password for root. I can login without any password, but the Java drivers require a password, so I have to set it.
In my last attempt, I tried following command in the MySQL console:
SET PASSWORD FOR root@localhost=PASSWORD('abc123');
But I got following error:
ERROR 1133 <42000>: Can't find any matching row in the user table