Problem with connect MySQL and jspMyAdmin

October 22, 2014 1.8k views

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?

1 Answer

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.

Have another answer? Share your knowledge.

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