emacarron / mybatis

Automatically exported from code.google.com/p/mybatis
0 stars 0 forks source link

Access Denied for user@localhost #69

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What version of the MyBatis are you using?
3.0

Please describe the problem.  Unit tests are best!

Hi, in my local machine when I connect with root user, everything os ok, but 
when I upload .war project to production server, it gives me an error.

Ibatis 2.3 have leak problems, but when i used it in production server does not 
show this error.

I don't think that mysql library is giving me problemes beacause another 
project is connecting with the same

I have checked root privileges, and it has ALL PRIVILEGES.

EXCEPTION DETAIL: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Access 
denied for user 'root'@'localhost' to database 'DATABASE'
com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Access denied for user 
'root'@'localhost' to database 'DATABASE'
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:885)
    at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3436)
    at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1247)
    at com.mysql.jdbc.Connection.createNewIO(Connection.java:2775)
    at com.mysql.jdbc.Connection.<init>(Connection.java:1555)
    at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)
    at java.sql.DriverManager.getConnection(DriverManager.java:582)
    at java.sql.DriverManager.getConnection(DriverManager.java:185)
    at com.tsb.ibatis.utils.DataBase.connect(DataBase.java:150)
    at com.tsb.ibatis.utils.MonitoringIbatisUtil.queryForList(MonitoringIbatisUtil.java:54)
    at com.tsb.mediation.MediationIndex.loadServerList(MediationIndex.java:409)
    at com.tsb.mediation.MediationIndex.<init>(MediationIndex.java:283)
    at com.tsb.mediation.Index.<init>(Index.java:34)
    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)
    at java.lang.Class.newInstance0(Class.java:355)
    at java.lang.Class.newInstance(Class.java:308)
    at com.sun.faces.config.ManagedBeanFactoryImpl.newInstance(ManagedBeanFactoryImpl.java:277)
    at com.sun.faces.application.ApplicationAssociate.createAndMaybeStoreManagedBeans(ApplicationAssociate.java:546)
    at com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:82)
    at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
    at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
    at org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:61)
    at org.apache.el.parser.AstValue.getValue(AstValue.java:107)
    at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
    at org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:101)
    at javax.faces.component.UIOutput.getValue(UIOutput.java:173)
    at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:189)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:320)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:200)
    at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:836)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:279)
    at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:242)
    at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
    at javax.faces.render.Renderer.encodeChildren(Renderer.java:137)
    at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
    at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:245)
    at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:176)
    at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
    at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
    at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
    at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
    at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:390)
    at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:517)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    at java.lang.Thread.run(Thread.java:619)

Original issue reported on code.google.com by smeerkah...@gmail.com on 21 Jul 2010 at 10:44

GoogleCodeExporter commented 9 years ago
Something was happening with database..we have to reinstall databases. but I 
dont know it could connect with ibatis 2.3 and it coudln't with 3.0 

Maybe some kind of restrictions with Sqlsessions that had been developed with 
3.0.. isnt it ? or iam wrong..

Original comment by smeerkah...@gmail.com on 22 Jul 2010 at 1:40

GoogleCodeExporter commented 9 years ago
That's related to MySQL only, MyBatis uses JDBC drivers without altering any 
existing component behavior.

Original comment by simone.t...@gmail.com on 13 Aug 2010 at 6:33