Re: Connecting to MySQL on GoDaddy.com

bwest7000 <[email protected]> Tue, 5 Jun 2007 08:54:47 -0700 (PDT)
Newsgroups gmane.comp.db.mysql.java
Message-ID <[email protected]>
you might want to disable the java language on your hosting account and 
then re-enable it. and use just the host name example, String url = 
"jdbc:mysql://p34mysql87.secureserver.net/databasename";
and connection, Connection conn = DriverManager.getConnection(url, 
"username", "password"); worked for me


Flint Gatrell wrote:
> 
> Hello,
> 
> I have a Linux hosting account with Java enabled, and I am trying to make
> a
> connection to my MySQL database from one of my servlets.  I have been
> successful in connecting to MySQL from this servlet on my local machine,
> but
> I have been unable to figure it out in my "live" environment.
> 
> The error I receive is included below.
> 
> Has anyone else solved a similar problem before with their own servlets?
> Or
> has anyone got any ideas of where I can look for someone that has?
> GoDaddy's tech support seems unwilling to assist.
> 
> I can post code snippets upon request.
> 
> Thanks,
> Flint
> 
> Exception report:
> 
> com.mysql.jdbc.CommunicationsException: Communications link failure due to
> underlying exception: ** BEGIN NESTED EXCEPTION **
> java.security.AccessControlException MESSAGE: access denied
> (java.net.SocketPermission mysql p41mysql3.secureserver.net resolve)
> STACKTRACE: java.security.AccessControlException: access denied
> (java.net.SocketPermission mysql p41mysql3.secureserver.net resolve) at
> java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
> at
> java.security.AccessController.checkPermission(AccessController.java:427)
> at java.lang.SecurityManager.checkPermission(SecurityManager.java:532) at
> java.lang.SecurityManager.checkConnect(SecurityManager.java:1031) at
> java.net.InetAddress.getAllByName0(InetAddress.java:1117) at
> java.net.InetAddress.getAllByName0(InetAddress.java:1098) at
> java.net.InetAddress.getAllByName(InetAddress.java:1061) at
> com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:137)
> at com.mysql.jdbc.MysqlIO.(MysqlIO.java:276) at
> com.mysql.jdbc.Connection.createNewIO(Connection.java:2666) at
> com.mysql.jdbc.Connection.(Connection.java:1531) at
> com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
> at java.sql.DriverManager.getConnection(DriverManager.java:525) at
> java.sql.DriverManager.getConnection(DriverManager.java:193) at
> myservlets.dbUtilities.connect(dbUtilities.java:46) at
> myservlets.MySQLAccess.processRequest(MySQLAccess.java:49) at
> myservlets.MySQLAccess.doPost(MySQLAccess.java:95) at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at
> org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:419)
> at
> org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServlet.java:169)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at
> sun.reflect.GeneratedMethodAccessor136.invoke(Unknown Source) at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585) at
> org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:239) at
> java.security.AccessController.doPrivileged(Native Method) at
> javax.security.auth.Subject.doAsPrivileged(Subject.java:517) at
> org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:266)
> at
> org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:157)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
> at
> org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:50)
> at
> org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:140)
> at java.security.AccessController.doPrivileged(Native Method) at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:136)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
> at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> at
> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
> at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
> at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
> at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
> at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:535)
> at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
> at
> org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:417)
> at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
> at
> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at
> org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:300) at
> org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:374) at
> org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743) at
> org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675)
> at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866) at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
> at java.lang.Thread.run(Thread.java:595) ** END NESTED EXCEPTION ** Last
> packet sent to the server was 1 ms ago.
> SQL State: 08S01
> SQL ErrorCode: 0
> 
> 
> -- 
> MySQL Java Mailing List
> For list archives: http://lists.mysql.com/java
> To unsubscribe:    http://lists.mysql.com/[email protected]
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Connecting-to-MySQL-on-GoDaddy.com-tf3774386.html#a10972397
Sent from the MySQL - Java mailing list archive at Nabble.com.


-- 
MySQL Java Mailing List
For list archives: http://lists.mysql.com/java
To unsubscribe:    http://lists.mysql.com/[email protected]