i am facing problem in connecting to mysql running on remote machine from the jboss,
Environment setup:
1. Linux machines
(Jboss) node1:192.168.1.12
(mysql) node2:172.18.0.1
i have jboss running on node1 and mysql running on node2. i want to connect to mysql from jboss. i have modified mysql-ds.xml modified as follows:
<local-tx-datasource>
<jndi-name>jdbc/ser</jndi-name>
<use-java-context>false</use-java-context>
<connection-url>jdbc:mysql://172.18.0.1:3306/roulette?zeroDateTimeBehavior=convertToNull</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>root</user-name>
<password>1234</password>
<valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker</valid-connection-checker-class-name>
<metadata>
<type-mapping>mySQL</type-mapping>
</metadata>
</local-tx-datasource>
and i have added the entry in my /etc/hosts file in node2 to give access to node1 which is as follows:
127.0.0.1 localhost
127.0.1.1 vishal
192.168.1.12 node1
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
when i start my jboss it gives error: java.sql.SQLException:access denied for user [email protected] (using password: YES)