List the listening ports and check if mysql is listed on it.
$ netstat -tln | grep mysql
If you cannot find the port number for mysql view my.cnf file to see if you can find the port number. If you see a line “skip-networking” try commenting out the line and then restart mysql daemon.
$ vi /etc/my.cnf[mysqld] set-variable=local-infile=0
$ service mysqld restart