Problem with lunching Java app (Spring, Hibernate) on Debian (MySQL) -
</bean id="mysqldatasource" > class="org.springframework.jdbc.datasource.drivermanagerdatasource">
<property name="driverclassname" value="com.mysql.jdbc.driver"/> <property name="url" value="jdbc:mysql://127.0.0.1:3306/mysqljava"/> <property name="username" value="mysqljava"/> <property name="password" value="the_bbt"/> </bean> <bean id="mysqlsessionfactory" class="org.springframework.orm.hibernate3.localsessionfactorybean"> <property name="datasource" ref="mysqldatasource"/> <property name="mappingresources"> <list> <value> hibernate/simpleentity.hbm.xml</value> </list> </property> <property name="hibernateproperties"> <value> hibernate.dialect=org.hibernate.dialect.mysqldialect hibernate.show_sql=true hibernate.hbm2ddl.auto=create hibernate.current_session_context_class=thread </value> </property> </bean>
above spring config, why app throws:
[java] 02.12.2010 18:29:13 org.hibernate.cfg.settingsfactory buildsettings [java] warning: not obtain connection query metadata [java] java.sql.sqlexception: access denied user 'root'@'localhost' (using password: yes) [java] @ com.mysql.jdbc.sqlerror.createsqlexception(sqlerror.java:1075)
and problem on windows(!!!
you need configure database access credentials, in datasource, not shown.
if have configured username/passwords, maybe mysql on linux install not have database setup?
Comments
Post a Comment