[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-developers] Unable to connect to MySQL using java
- Subject: Re: [cobalt-developers] Unable to connect to MySQL using java
- From: Anders Björklund <andersb@xxxxxxxxxxx>
- Date: Thu Oct 17 06:34:49 2002
- List-id: Discussion Forum for developers on Sun Cobalt Networks products <cobalt-developers.list.cobalt.com>
Muhammad Farhan wrote:
> I am trying to connect to MySQL.I have placed mm.mysql drivers in
> "jakarta-tomcat/lib" folder. but whenever i try to connect to mysql, i
> receive this error:
>
> Cannot connect to MySQL server on . Is there a MySQL server running on the
> machine/port you are trying to connect to?
> (java.security.AccessControlException)
You are not authorized to access the MySQL server on the default port...
"java.security.AccessControlException" is from the Java Security Manager.
> please note that i can connect to mysql using telnet and php script.
>
> Please help me to overcome this error.
Add this line to your .policy file:
permission java.lang.SocketPermission "localhost:3306", "connect";
--anders