'Unable to resolve name [org.hibernate.dialect.MYSQLDialect] as strategy [org.hibernate.dialect.Dialect] for

I am using hibernate core 5.6.5.Final and mysql-connector-java 8.0.28 . With the above dependency I am trying to run a simple hibernate code and every time I am getting Unable to resolve name [org.hibernate.dialect.MYSQLDialect] as strategy [org.hibernate.dialect.Dialect]

    Error 
    [Error][1]
    My pom.xml 
    [pom.xml][2]
    
    
    hibernate.cfg.xml
    [hibernate.cfg.xml][1]
    
    Main code
    [main code][4]
    
    
      [1]: https://i.stack.imgur.com/ISJhp.png
      [2]: https://i.stack.imgur.com/BGYzF.png
      [3]: https://i.stack.imgur.com/T3JYZ.png
      [4]: https://i.stack.imgur.com/IV3hA.png


  [1]: https://i.stack.imgur.com/OO9OL.png


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source