One possibility is that mysql server & glassfish server are
installed on the same host.
So, you should go to etc/mysql/my.cnf if there is a public ip address bind
you should remove it and put only bind-address = 127.0.0.1
Another case is that in stead of URL: jdbc:mysql://localhost:3306/SIRS
you should put
This worked for me.