Author Topic: The connection to MySQL does not seem to be working correctly.  (Read 4219 times)

wfiinc

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
    • View Profile
I've read the faq, and mine is slightly different...


"Error JDBC:-- Inner Exception -- - Exception: com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException - Error: - Server connection failure during transaction. Due to underlying exception: 'java.sql.SQLException: Access denied for user 'queuemetrics'@'localhost' (using password: YES)'. - - ** BEGIN NESTED EXCEPTION ** - - java.sql.SQLException - MESSAGE: Access denied for user 'queuemetrics'@'localhost' (using password: YES) - - STACKTRACE: - - java.sql.SQLException: Access denied for user 'queuemetrics'@'localhost' (using password: YES) - at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:946) - 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:2924) - at com.mysql.jdbc.Connection.(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:207) - at it.loway.tpf.SQL.openConnection(SQL.java:51) - at it.loway.tpf.transaction.servlets.LowayTransactionController.serveRequest(LowayTransactionController.java:531) - at it.loway.tpf.transaction.servlets.LowayTransactionController.serveRequestWrapper(LowayTransactionController.java:373) - at it.loway.tpf.transaction.servlets.LowayTransactionController.doGet(LowayTransactionController.java:217) - at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) - at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) - at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) - at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) - 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:118) - 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.coyote.http11.Http11Processor.process(Http11Processor.java:799) - at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) - at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) - at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) - at java.lang.Thread.run(Thread.java:662) - - - ** END NESTED EXCEPTION ** - - - Attempted reconnect 3 times. Giving up.Stack trace: - com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: Server connection failure during transaction. Due to underlying exception: 'java.sql.SQLException: Access denied for user 'queuemetrics'@'localhost' (using password: YES)'. - - ** BEGIN NESTED EXCEPTION ** - - java.sql.SQLException - MESSAGE: Access denied for user 'queuemetrics'@'localhost' (using password: YES) - - STACKTRACE: - - java.sql.SQLException: Access denied for user 'queuemetrics'@'localhost' (using password: YES) - at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:946) - 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:2924) - at com.mysql.jdbc.Connection.(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:207) - at it.loway.tpf.SQL.openConnection(SQL.java:51) - at it.loway.tpf.transaction.servlets.LowayTransactionController.serveRequest(LowayTransactionController.java:531) - at it.loway.tpf.transaction.servlets.LowayTransactionController.serveRequestWrapper(LowayTransactionController.java:373) - at it.loway.tpf.transaction.servlets.LowayTransactionController.doGet(LowayTransactionController.java:217) - at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) - at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) - at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) - at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) - 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:118) - 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.coyote.http11.Http11Processor.process(Http11Processor.java:799) - at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) - at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) - at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) - at java.lang.Thread.run(Thread.java:662) - - - ** END NESTED EXCEPTION ** - - - Attempted reconnect 3 times. Giving up. - at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:888) - at com.mysql.jdbc.Connection.createNewIO(Connection.java:2997) - at com.mysql.jdbc.Connection.(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:207) - at it.loway.tpf.SQL.openConnection(SQL.java:51) - at it.loway.tpf.transaction.servlets.LowayTransactionController.serveRequest(LowayTransactionController.java:531) - at it.loway.tpf.transaction.servlets.LowayTransactionController.serveRequestWrapper(LowayTransactionController.java:373) - at it.loway.tpf.transaction.servlets.LowayTransactionController.doGet(LowayTransactionController.java:217) - at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) - at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) - at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) - at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) - 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:118) - 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.coyote.http11.Http11Processor.process(Http11Processor.java:799) - at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) - at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) - at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) - at java.lang.Thread.run(Thread.java:662) - -- End Inner Exception -- - "
Root cause: The connection to MySQL does not seem to be working correctly.

wfiinc

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
    • View Profile
Re: The connection to MySQL does not seem to be working correctly.
« Reply #1 on: June 17, 2011, 21:22:49 »
Sorry, forgot to mention that I installed using Espresso.

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: The connection to MySQL does not seem to be working correctly.
« Reply #2 on: June 20, 2011, 12:25:28 »
Which version of the OS did you install on?
Did Espresso confirm it was working?


Anyway see this:

http://queuemetrics.com/faq.jsp#faq-009


logon to mysql and issue a:

Code: [Select]
grant all privileges on queuemetrics.* to 'queuemetrics'@'localhost' identified by 'javadude';

It should fix it.



wfiinc

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
    • View Profile
Re: The connection to MySQL does not seem to be working correctly.
« Reply #3 on: June 20, 2011, 19:06:32 »
Ok, it looks like it failed to create the db. I executed the above command, but now it's saying queuemetrics db not found - sure enough, it doesn't exist. I did a yum reinstall and got

Creating database
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
ERROR 1049 (42000): Unknown database 'queuemetrics'

Does the espresso package assume that the root mysql password is set to something specific?

BTW, this is installing on a stock Elastix 2 machine.

wfiinc

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
    • View Profile
Re: The connection to MySQL does not seem to be working correctly.
« Reply #4 on: June 20, 2011, 19:35:25 »
Thanks for the help - I got it working. I did a yum reinstall queuemetrics and noticed that it asked me to cd to the WEB-INF/README dir and run the instaldb script. Everything seems ok now.

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: The connection to MySQL does not seem to be working correctly.
« Reply #5 on: June 22, 2011, 10:00:13 »
Which version of Elastix is that? because Elastix is supposed to find the password automagically.