Question

Problem with connect MySQL and jspMyAdmin

Posted October 22, 2014 2k views

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?

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.

×
1 answer

funny question:

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

tcp        0      0 0.0.0.0:3306                0.0.0.0:*                   LISTEN      ####/mysqld
tcp        0      127.0.0.1:3306                127.0.0.1:*                   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 0.0.0.0 or 127.0.0.1 and restart mysql. If it’s the other 2, I would guess odd firewall configuration.

Submit an Answer