Set up Glassfish connection pool to talk to a database on a Ubuntu VPS

Posted by Harry Pham on Server Fault See other posts from Server Fault or by Harry Pham
Published on 2011-01-02T05:40:13Z Indexed on 2011/01/02 5:55 UTC
Read the original article Hit count: 370

On my Ubuntu VPS, i have a mysql server running and a Glassfish 3.0.1 Application Server running. And I am having a hard to have my GF successfully ping the database. Here is my GF set up

Assume: x.y.z.t is the ip of my VPS

Resource Type: javax.sql.ConnectionPoolDataSource
User: root
DatabaseName: scholar
Url: jdbc:mysql://x.y.z.t:3306/scholar
URL: jdbc:mysql://x.y.z.t:3306/scholar
Password: xxxx
PortNumber: 3306
ServerName: x.y.z.t

Inside my glassfish3/glassfish/lib, I have my mysql-connector-java-5.1.13-bin.jar

Inside the database, table mysql here is the result of the query

select User, Host from user;
+------------------+-----------+
| User             | Host      |
+------------------+-----------+
| root             | 127.0.0.1 | 
| debian-sys-maint | localhost | 
| root             | localhost | 
| root             | yunaeyes  | 
+------------------+-----------+

Now from my machine, if I try to connect to this db via mysql browser (mysql client software), well I cant. Well from the table above, seem like it only allow localhost to connect to this db. Keep in mind that both my db and my GF are on the same VPS. Please help

© Server Fault or respective owner

Related posts about ubuntu

Related posts about database