views:

85

answers:

2

I'm using glassfish(v2.11) as my application server and I have another machine for mysql database server. Currently I want to separate the app server and db server, so I create a jdbc datasource to point to mysql server, but it doesn't works as expect, by the way, when I create datasource to point to local machine (glassfish app server and mysql db server in single machine), and It works well. Is there any configuration I need to care of when pointing datasource to different machine which I use to host my database (MySQL 5.1)?

A: 

Besides granting the mysql user you'll connect as the proper rights, specifying the host in the JDBC url, and making sure there's no firewall stopping you (default mysql uses port 3306), there should be no difference.

nos
I have grant user properly, and I turn off firewall, but it still not working... anyway, It works after I restart glassfish.. heheAnyway, appreciate for your reply nos... :)
Dickson
A: 

WOW ...restart glashfish app server and it works .. :)

Dickson