java - ec2+tomcat+mysql Access Denied! -


i'm running tomcat6 , mysql5 on single ec2 instance , cannot cannot outside world.

my context.xml on tomcat in ec2...

<bean id="datasource" class="com.mysql.jdbc.jdbc2.optional.mysqlconnectionpooldatasource">     <property name="url" value="jdbc:mysql://ec2-xx-xx-xxx-178.compute1.amazonaws.com:3306/data_dbo" />     <property name="user" value="a_user" />     <property name="password" value="a_password" /> </bean> 

client context.xml

 <bean id="myservice" class="org.springframework.remoting.httpinvoker.httpinvokerproxyfactorybean">         <property name="serviceurl" value="http://ec2-xx-xx-xxx-xxx.compute-1.amazonaws.com:8080/myservice-services/remoting/thingserviceexporter"/>         <property name="serviceinterface" value="com.things.services.myservice"/>     </bean> 

error on clinet...

caused by: java.sql.sqlexception: access denied user ''@'domu-xx-xx-xx-xx-xx-db.compute-1.internal' (using password: no) 

i've setup privileges user doesn't seem using user setup in tomcat datasource. because of error on client (access denied user ''@) no user, no password. do need setup between tomcat , mysql on ec2 because seems using internal dns access mysql?

let me know if can provide other information!

i found issue. persistance.xml had following code...

 <properties>       <property name="hibernate.connection.username" value=""/>       <property name="hibernate.connection.driver_class" value=""/>       <property name="hibernate.connection.password" value=""/>       <property name="hibernate.connection.url" value=""/>     </properties> 

not sure how got in there! settings in persistance.xml must override settings in spring context file.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -