[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-developers] Unable to connect to MySQL using java



Hi everyone,
I've already got this problem, and I've found an answer.
The line that must be added to tomcat.policy is :

permission java.net.SocketPermission "localhost:3306", "connect";

and not :

permission java.lang.SocketPermission "localhost:3306", "connect";

it allows Java from localhost to connect on the port 3306.

Now i'd like to know how to tell the script startup.sh (or tomcat.sh) that i'm using a tomcat.policy.custom, cause i've read that it will be better if i don't modify the tomcat.policy

thanks a lot.

Anders Björklund wrote :

Add this line to your .policy file:
permission java.lang.SocketPermission "localhost:3306", "connect";

--anders