How to resolve “fail to connect to MySQL Server at localhost:3306 with user root”?

I have tried over and over to connect to the local server using MySQL Workbench 6.3 on my computer using the following parameters, but it won’t let me connect. Do you think it is a firewall issue?

Here are my parameters:

hostname: localhost
port: 3306
username: root
password: [not_really]

Here is the picture of my problem for anyone’s viewing.

Answer

  1. Check that the MySQL listen on port 3306 netstat -lnp | grep 3306 on server. Otherwise, check the configuration directive bind-address
  2. Check that the MySQL accessible from you webserver telnet <mysql host> 3306 ( – as in your web application configuration). Otherwise, check firewall rules. Note. telnet by default is not installed in Window, and may be missing in Linux then this component must be installed manually.
  3. If the first test is successful, you will probably need to reset a user’s password in MySQL and/or reconfigure which hosts are allowed to connect to it.

Use root account for the web application with a database – a very bad idea!

Attribution
Source : Link , Question Author : DMicheal , Answer Author : Community

Leave a Comment