title: $ mysql -u root -p -h 127.0.0.1 Enter password: ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (111)
body: <p>I am just a beginner to the programming world. I spent more than 14 hours making dozens of changes suggested in various answers on this site, but unsuccessful. Can some one help me?</p>
  
  <p>I installed MySQL thru Cygwin. </p>
  
  <p>I do not see my.cnf file, but do have 4 files, my-small.cnf to my-huge.cnf files, in <code>C:\cygwin64\usr\share\mysql.</code> </p>
  
  <pre><code>$ which mysql
  /usr/bin/mysql.
  </code></pre>
  
  <p>And, have my-small.cnf, but no <code>binding-localhost</code> entry</p>
  
  <pre><code>[client]
   #password       = your_password
   host            = 127.0.0.1
   port            = 3306
   socket          = /var/run/mysql/mysql.sock
  </code></pre>
  
  <p>If I enter first line, it prompts for password, but, the prompt does not accept any password nor move. If I enter anything, it will display error message.</p>
  
  <pre><code>$ mysql -u root -p -h 127.0.0.1
  Enter password:
  ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (111)
  </code></pre>
  
  <p>OR, if I enter</p>
  
  <pre><code>$ mysql -u root -p -h localhost
  Enter password:
  ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysql.sock' (2)
  </code></pre>
  
  <p>OR, for alias entry</p>
  
  <pre><code>$ mysql start
  ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (111)
  </code></pre>