访问其他系统数据库?

时间:2012-10-20 08:38:40

标签: java mysql

  

java.sql.SQLException:用户'root'@'dexterlabs06'拒绝访问(使用密码:YES)       在com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1075)       在com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3562)       在com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3494)       在com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:920)       在com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:4000)       在com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1285)       在com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2186)       在com.mysql.jdbc.ConnectionImpl。(ConnectionImpl.java:787)       在com.mysql.jdbc.JDBC4Connection。(JDBC4Connection.java:49)       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)       at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)       at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)       at java.lang.reflect.Constructor.newInstance(Constructor.java:513)       在com.mysql.jdbc.Util.handleNewInstance(Util.java:409)       在com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:357)       在com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)       在java.sql.DriverManager.getConnection(DriverManager.java:582)       在java.sql.DriverManager.getConnection(DriverManager.java:185)       在Testloginserv.doPost(Testloginserv.java:41)       在javax.servlet.http.HttpServlet.service(HttpServlet.java:641)       在javax.servlet.http.HttpServlet.service(HttpServlet.java:722)       在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)       在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)       at or or or or or or or or or or or or or or or or or       在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)       在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)       在org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)       在org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)       在org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)       在org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)       在org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)       在org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)       在org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)       在org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:964)       at org.apache.coyote.AbstractProtocol $ AbstractConnectionHandler.process(AbstractProtocol.java:515)       at org.apache.tomcat.util.net.JIoEndpoint $ SocketProcessor.run(JIoEndpoint.java:304)       at java.util.concurrent.ThreadPoolExecutor $ Worker.runTask(ThreadPoolExecutor.java:885)       at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:907)       在java.lang.Thread.run(Thread.java:619)

1 个答案:

答案 0 :(得分:1)

在数据库上,为您的系统授予权限,它应该可以正常工作。 与your_user_name@'192.192.192.192'

一样

看看这个tutorial on granting privileges in MySQL