1
J'ai commencé à apprendre à hiberner. Voici mon fichier hibernate-configuration:Hibernate: MySql vs '' utilisateur
<hibernate-configuration>
<session-factory>
<!-- connection settings -->
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="connection.url">jdbc:mysql://localhost:3306/hibernatelearning</property>
<property name="connection.name">root</property>
<property name="connection.password"></property>
<!-- JDBC connection pool -->
<property name="connection.pool_size">1</property>
<!-- dialect -->
<property name="dialect">org.hibernate.dialect.HSQLDialect</property>
<property name="show_sql">true</property>
<property name="current_session_context_class">thread</property>
<mapping resource="./Event.hbm.xml"/>
</session-factory>
</hibernate-configuration>
L'exception est:
INFO: connection properties: {name=root, password=****} 22.03.2011 15:45:14 org.hibernate.cfg.SettingsFactory buildSettings WARNING: Could not obtain connection to query metadata com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Access denied for user ''@'localhost' to database 'hibernatelearning'
Est-ce que quelqu'un sait comment faire face?