Report this

What is the reason for this report?

Problem with connect MySQL and jspMyAdmin

Posted on 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?



This textbox defaults to using Markdown to format your 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 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.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.