弱弱得问,数据库连接问题(mysql)
环境已经配置好了。
mysql得驱动也有了。可是还是连接有问题,请高手指教
谢谢
Tue Apr 13 21:21:08 CST 2004: 成功注册JDBC驱动程序org.gjt.mm.mysql.Driver
Tue Apr 13 21:21:08 CST 2004: 成功创建连接池cumt
Tue Apr 13 21:21:08 CST 2004: 无法创建下列URL的连接: jdbc:mysql://localhost/cumt?useUnicode=true&characterEncoding =8859_1
java.sql.SQLException: Data source rejected establishment of connection, message from server: "Host 'localhost.localdomain'
is not allowed to connect to this MySQL server"
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:589)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:1654)
at com.mysql.jdbc.Connection.<init>;(Connection.java:432)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:400)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at cn.edu.cumt.datebase.DBConnectionManager$DBConnectionPool.newConnection(DBConnectionManager.java:354)
at cn.edu.cumt.datebase.DBConnectionManager$DBConnectionPool.getConnection(DBConnectionManager.java:296)
at cn.edu.cumt.datebase.DBConnectionManager.getConnection(DBConnectionManager.java:79)
at cn.edu.cumt.datebase.DBConnect.init(DBConnect.java:24)
at cn.edu.cumt.datebase.DBConnect.<init>;(DBConnect.java:47)
at cn.edu.cumt.NewsManager.getTopNews(NewsManager.java:76)
at cn.edu.cumt.CumtIndex.getScrollNews(CumtIndex.java:2
at org.apache.jsp.test_jsp._jspService(test_jsp.java:5
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
怎么都没有人来看呀