users@glassfish.java.net

(no subject)

From: Roel_D <openindiana_at_out-side.nl>
Date: Mon, 22 Oct 2012 07:31:52 +0200

What username and password do you use in glassfish for connecting to mysql?

You need to give this user rights to connect!

In mysql: grant all on *.* to 'glassfish'@'127.0.0.1' identified by 'glassfish' ;

This will create a user named glassfish with a password glassfish that has all rights.

Set in my.cnf "skip-name-resolve'. In case mysql can't resolve the hostname of 127.0.0.1

Kind regards,

The out-side

Op 22 okt. 2012 om 02:17 heeft forums_at_java.net het volgende geschreven:

> Hi, I'm trying to connect to a mysql server on a linux server. The appserver
> and the dbserver are on the same server. I have configured the mysql to
> accept connections on my ip address (differente from 127.0.0.1). I can
> connect to the database from a remote machine. But if I try to create a
> connection pool from my glassfish server I get this error. Communications
> link failure The last packet sent successfully to the server was 0
> milliseconds ago I have seen some answers on internet including this:
> http://edwin.baculsoft.com/2011/11/error-communications-link-failure-when-connecting-glassfish-v3-to-mysql/
> But the problem is that if I change the IP to 127.0.0.1 I wont connect to
> mysql from external ip address. I want to know how do you approach this
> issue. Thank you for yor answers.
>
> --
>
> [Message sent by forum member 'reos']
>
> View Post: http://forums.java.net/node/891638
>
>