Problem with connect MySQL and jspMyAdmin

  • Posted October 22, 2014

Hi! I have mysql server and jspMyAdmin. I set default port(3306), host = localhost, and user = root with empty password in jspmyadmin config and in my.cnf.

But after deploy jspMyAdmin write Oops! an exception occurred. The exception was: java.sql.SQLException: Communication failure during handshake. Is there a server running on localhost:3306? The exception class was : class java.sql.SQLException

how to fix it?


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

funny question:

which of the 3 following do you get when you run “netstat -plant |grep ‘3306’”:

tcp        0      0      *                   LISTEN      ####/mysqld
tcp        0      *                   LISTEN      ####//mysqld
tcp        0      x.x.x.x:3306                x.x.x.x:*                   LISTEN      ####//mysqld

The 3rd one is just an example. It would be your external IP address. If it’s the 3rd one, you will need to modify /etc/my.cnf or /etc/mysql/my.cnf and change the bind to or and restart mysql. If it’s the other 2, I would guess odd firewall configuration.