title: Starting MySQL Error on Snow Leopard
body: <h2>ORIGINAL POST</h2>
  
  <p>I just erased and re-installed Snow Leopard. I installed MySQL 5.1.48 64-bit clean. I'm having issues with the MySQL server... when I boot the computer and log in, the server is not running. I tried to start it using the preference pane by clicking "Start MySQL Server", but all it did was highlight the button blue and think for like a minute, and then the button went back to normal and nothing happened.</p>
  
  <p>I then tried starting it from the terminal:</p>
  
  <pre><code>Hristo$ sudo /usr/local/mysql/support-files/mysql.server start
  Starting MySQL
  .....................................................................
  ERROR! Manager of pid-file quit without updating file.
  </code></pre>
  
  <p>so I checked the status:</p>
  
  <pre><code>Hristo$ sudo /usr/local/mysql/support-files/mysql.server status
  Password:
  /usr/local/mysql/support-files/mysql.server: line 418: pidof: command not found
   ERROR! MySQL is not running
  </code></pre>
  
  <p>I tried this:</p>
  
  <pre><code>Hristo$ /usr/local/mysql/bin/mysql -u root -p
  Enter password: 
  ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
  </code></pre>
  
  <p>So I'm not sure what to do. When I first installed, the server was working but I went to the preference pane to try and stop it… and the same thing happened… I clicked the "Stop MysQL Server" button, it did some thinking, then nothing. So I restarted the computer and now I'm having the above problems and apparently, the mysql.sock file is not in /tmp/ anymore. It was there when I installed, and it is not there after I restarted the computer.</p>
  
  <p>Any ideas?</p>
  
  <h2><strong>UPDATE</strong></h2>
  
  <p>This is my <code>/etc/my.cnf</code> file.</p>
  
  <pre><code>[client]
  socket = /var/mysql/mysql.sock
  
  [mysqld]
  socket = /var/mysql/mysql.sock
  </code></pre>
  
  <h2><strong>UPDATE 2</strong></h2>
  
  <p>When setting up Apache, PHP, and MySQL, I followed these instructions: <a href="http://superfancy.net/coding/php-mysql-apache-in-mac-osx-leopard/" rel="noreferrer">http://superfancy.net/coding/php-mysql-apache-in-mac-osx-leopard/</a> Right now, if I remove the MySQL configuration file, things seem to work fine. But when <code>my.cnf</code> exists in <code>/etc/</code>, things don't work. The MySQL verion is:</p>
  
  <pre><code>Hristo$ mysql --version
  /usr/local/mysql/bin/mysql  Ver 14.14 Distrib 5.1.46, for apple-darwin9.8.0 (i386) using readline 5.1
  </code></pre>
  
  <h2><strong>UPDATE 3</strong></h2>
  
  <p>mysql.err:</p>
  
  <pre><code>100706 11:38:36 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
  100706 11:38:36 [Warning] '--log' is deprecated and will be removed in a future release. Please use ''--general_log'/'--general_log_file'' instead.
  100706 11:38:36 [Warning] '--log_slow_queries' is deprecated and will be removed in a future release. Please use ''--slow_query_log'/'--slow_query_log_file'' instead.
  100706 11:38:36 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/mysql/data/ is case insensitive
  100706 11:38:36 [Note] Plugin 'FEDERATED' is disabled.
  100706 11:38:36  InnoDB: Started; log sequence number 0 69987
  100706 11:38:36 [ERROR] Can't start server : Bind on unix socket: Permission denied
  100706 11:38:36 [ERROR] Do you already have another mysqld server running on socket: /var/mysql/mysql.sock ?
  100706 11:38:36 [ERROR] Aborting
  
  100706 11:38:36  InnoDB: Starting shutdown...
  100706 11:38:41  InnoDB: Shutdown completed; log sequence number 0 69987
  100706 11:38:41 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete
  </code></pre>
  
  <p>mysql.log:</p>
  
  <pre><code>/usr/local/mysql/bin/mysqld, Version: 5.1.46-log (MySQL Community Server (GPL)). started with:
  Tcp port: 0  Unix socket: /var/mysql/mysql.sock
  Time                 Id Command    Argument
  </code></pre>