Not able to login to MySQL server through MySQL workbench I have installed MySQL 5.7 server on Linux machine and am able to login to the database within the server, but not able to connect to it from Workbench.

I have disabled Iptables. Port 3306 is listening.

**root@master:~#** lsof -i TCP:3306
COMMAND  PID  USER   FD   TYPE  DEVICE SIZE/OFF NODE NAME
mysqld  2563 mysql   27u  IPv4 1905031      0t0  TCP localhost:mysql (LISTEN)        

**root@master:~#** service ufw status
* ufw.service - Uncomplicated firewall
   Loaded: loaded (/lib/systemd/system/ufw.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Mon 2017-02-06 11:28:42 UTC; 9min ago
  Process: 2947 ExecStop=/lib/ufw/ufw-init stop (code=exited, status=0/SUCCESS)
  Process: 2814 ExecStart=/lib/ufw/ufw-init start quiet (code=exited, status=0/SUCCESS)
 Main PID: 2814 (code=exited, status=0/SUCCESS)

Feb 06 11:28:01 movimento-hadoop-master systemd[1]: Starting Uncomplicated firewall...
Feb 06 11:28:01 movimento-hadoop-master systemd[1]: Started Uncomplicated firewall.
Feb 06 11:28:42 movimento-hadoop-master systemd[1]: Stopping Uncomplicated firewall...
Feb 06 11:28:42 movimento-hadoop-master ufw-init[2947]: Skip stopping firewall: ufw (not enabled)
Feb 06 11:28:42 movimento-hadoop-master systemd[1]: Stopped Uncomplicated firewall


Could anyone please help me?
If your MySQL Server and Workbench are on different machine then you need a mysql user to connect and you also need to comment the bind address in my.cnf

User creation 

GRANT ALL PRIVILEGES ON *.* TO 'someUser'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;
FLUSH PRIVILEGES;


And then find the following line and comment it out in your my.cnf file, which usually lives on /etc/mysql/my.cnf or /etc/my.cnf on Unix/OSX systems.

Comment bind-address

Change line

 bind-address = 127.0.0.1


to

 #bind-address = 127.0.0.1 (commented)


And restart the MySQL server for the changes to take effect ,Now try this user from workbench