title: mysql running but cannot connect to 127.0.0.1
body: <p>I have installed mysql55-server using macports.</p>
  
  <p>I can start the server successfully via:</p>
  
  <pre><code>$ sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql55-server.plist
  </code></pre>
  
  <p>And confirm I am running the correct mysql:</p>
  
  <pre><code>$ which mysql 
  
  /opt/local/lib/mysql55/bin/mysql
  </code></pre>
  
  <p>If I run <code>$mysql</code>, I can connect successfully. If I then run: </p>
  
  <pre><code>mysql&gt; show databases;
  </code></pre>
  
  <p>It shows two databases.</p>
  
  <p>Using Sequel Pro, I can connect via socket:</p>
  
  <pre><code>u: root
  p: root
  Socket: /opt/local/var/run/mysql55/mysqld.sock
  </code></pre>
  
  <p>Connects and loads up the databases just fine. </p>
  
  <p>The problem is connecting via 127.0.0.1 or localhost.</p>
  
  <p>If I try to connect using either through standard connection in Sequel Pro, I get:</p>
  
  <pre><code>Unable to connect to host 127.0.0.1, or the request timed out.
  
  Be sure that the address is correct and that you have the necessary privileges, or try increasing the connection timeout (currently 10 seconds).
  
  MySQL said: Can't connect to MySQL server on '127.0.0.1' (61)
  </code></pre>
  
  <p>So it seems the mysql server is not identified as 127.0.0.1. In my hosts file I have local host listed as 127.0.0.1</p>
  
  <pre><code>127.0.0.1   localhost
  255.255.255.255 broadcasthost
  ::1             localhost 
  fe80::1%lo0 localhost 
  </code></pre>
  
  <p>Also if I try to run:</p>
  
  <pre><code>$ mysql -h 127.0.0.1 -u root
  </code></pre>
  
  <p>I get:</p>
  
  <blockquote>
    <p>ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (61)</p>
  </blockquote>
  
  <p>I have the same setup on Mavericks which works fine. I have updated to Yosemite  on another computer and are experiencing these problems. I have tried to cross check all settings between machines. It all seems to matchup. Why would localhost, 127.0.0.1, not be connecting, even though the server is running?</p>
  
  <h2>UPDATE</h2>
  
  <p>Per @Marc B and neverpanic, I changed my.cnf (/opt/local/etc/mysql55/my.cnf). I removed the include to pull data from the original config file at the top and commented out skip-networking:</p>
  
  <pre><code>[client]
  port                   =  3306
  socket                 = /opt/local/var/run/mysql55/mysqld.sock
  default-character-set  =  utf8
  
  [mysqld_safe]
  socket                 = /opt/local/var/run/mysql55/mysqld.sock
  nice                   =  0 
  default-character-set  = utf8
  
  [mysqld]
  socket                 =  /opt/local/var/run/mysql55/mysqld.sock
  port                   = 3306
  bind-address           =  127.0.0.1
  skip-external-locking
  #skip-networking
  
  character-set-server   =  utf8
  
  [mysqldump]
  default-character-set  =  utf8
  </code></pre>
  
  <p>Restarted mysql and it worked. </p>