To może ci pomóc
Dodaj również nazwę użytkownika i hasło
<property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/sampleDB</property>
<property name="hibernate.connection.username">yourUserNameForMysql</property>
<property name="hibernate.connection.password">passwordForMySql</property>
Po Mysql 5.x użyj klasy org.hibernate.dialect.MySQL5Dialect
<property name="hibernate.dialect">org.hibernate.dialect.MySQL5Dialect</property>
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/sampleDB</property>
<property name="hibernate.connection.username">yourUserNameForMysql</property>
<property name="hibernate.connection.password">passwordForMySql</property>