• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Access denied for user 'root'@'localhost' (using password: YES)

 
Sree Kumari
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I started using Hibernate4.5.1 wrote a simple program,created a new database but it is showing Access denied for user 'root'@'localhost' (using password: YES) error the previous versions are working fine with old databases

 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It looks like your database credentials that you have configured in Hibernate are incorrect. Have you verified them?
 
Volodymyr Lysenko
Ranch Hand
Posts: 512
1
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The defaults for mysql 5 are :
username = root
password is empty string.

In hibernate.cfg.xml:

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic