Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

i am facing problem in connecting to mysql running on remote machine from the jboss,

Environment setup:

 1. Linux machines 
    (Jboss) node1: 
    (mysql) node2:

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:











and i have added the entry in my /etc/hosts file in node2 to give access to node1 which is as follows:     localhost     vishal  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 root@yadnesh-AOA150.loacl (using password: YES)

share|improve this question
And what, prey tell, might the problem actually be? – womble Jul 25 '11 at 8:47
@womble:sir i didn't got your point?. what you expecting ? – VISHAL Jul 25 '11 at 9:35
A description of the problem you're having, which you appear to have now added at the bottom of your question. – womble Jul 25 '11 at 22:16
up vote 1 down vote accepted

Your MySql Server is not setup for accept connection from remote host with user "root". Could you try another user?

share|improve this answer
thanks for the replay. i created different user it started working. – VISHAL Jul 26 '11 at 11:48

Do you have network connectivity? Through the stack / can you connect using telnet to the port mysqld is bound on the target from the source? Can you connect using a command line tool to test SQL connectivity into a database?

share|improve this answer
check database connectivity first, hosts file not needed as you're using the IP address in mysql-ds.xml anyway - check 3306 is permitted by iptables/SELinux on the database server – BoyMars Jul 25 '11 at 11:18
thanks for the replay – VISHAL Jul 26 '11 at 11:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.