To vám může pomoci
Přidejte také uživatelské jméno a heslo
<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 použijte třídu 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>