MySQL does not listen on port 3306

Solution 1:

Typically you would edit the /etc/my.cnf (this is the location for CentOS 7) file and make the following changes:

  1. Add the line: bind-address = 0.0.0.0
  2. Comment out the line "skip-networking" by placing a # in front.

IE:

[mysqld]
bind-address    = 0.0.0.0
# skip-networking

The first line defines that this is for the MySql daemon. The second line tells MySql to bind to a network interface, 0.0.0.0 means all interfaces. The third line tells MySql to not skip networking configuration routines.

Note that other distributions may have the MySQL configuration file in different folder locations.