title: MySQL pid ended (cannot start mysql)
body: <p>I have a clean install of MySQL (mysql-5.5.24-osx10.6-x86_64).  I am on Lion (OS 10.7.4) with a Mac Pro Quad Core. I installed MySQL the GUI installer and also installed the pref pane and the startup item. </p>
  
  <p>However when I run:</p>
  
  <pre><code>sudo ./bin/mysqld_safe
  </code></pre>
  
  <p>I get this message:</p>
  
  <pre><code>120515 17:58:19 mysqld_safe Logging to '/usr/local/mysql-5.5.24-osx10.6-x86_64/data/Dannys-Mac-Pro.local.err'.
  120515 17:58:19 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql-5.5.24-osx10.6-x86_64/data
  120515 17:58:20 mysqld_safe mysqld from pid file /usr/local/mysql-5.5.24-osx10.6-x86_64/data/Dannys-Mac-Pro.local.pid ended
  </code></pre>
  
  <p>I also cannot start MySQL from the preference pane.</p>
  
  <p>Here is what I have tried so far based on the hours of Googling and research today:</p>
  
  <p><strong>Permissions issues?</strong></p>
  
  <p><a href="https://stackoverflow.com/a/9643282/819276">This:</a></p>
  
  <pre><code>cd /usr/local
  sudo chown mysql mysql
  sudo chown mysql mysql-5.5.24-osx10.6-x86_64
  sudo chown _mysql mysql
  sudo chown _mysql mysql-5.5.24-osx10.6-x86_64
  </code></pre>
  
  <p>and</p>
  
  <pre><code>sudo chown -R /usr/local/mysql-5.5.24-osx10.6-x86_64/
  sudo chown -R /usr/local/mysql
  </code></pre>
  
  <p><a href="https://stackoverflow.com/a/5124022/819276">This:</a></p>
  
  <pre><code>sudo chown -R root:wheel /Library/StartupItems/MySQLCOM
  </code></pre>
  
  <p><strong>Link issues?</strong></p>
  
  <p><a href="https://stackoverflow.com/a/4755143/819276">This:</a></p>
  
  <p>in /usr/local/mysql/support-files/mysql.server -- I did:</p>
  
  <pre><code>basedir="/usr/local/mysql"
  datadir="/usr/local/mysql/data"
  </code></pre>
  
  <blockquote>
    <p>In the file /etc/rc.common add the follow line at end:
    /usr/local/mysql/bin/mysqld_safe --user=mysql &amp;</p>
  </blockquote>
  
  <p><a href="https://stackoverflow.com/a/3263280/819276">This:</a></p>
  
  <pre><code>sudo ln -s /usr/local/mysql-5.5.24-osx10.6-x86_64 /usr/local/mysql
  </code></pre>
  
  <p>I also tried the <a href="https://stackoverflow.com/a/2685337/819276">removal process here</a> and reinstalled but this did not seem to make a difference. I also launched Activity Monitor in OS X to see if any other mySQL processes were running by chance but they were not. </p>
  
  <p>Nothing above worked so I am sort of at wits end. Here is the log from the .err file located at:</p>
  
  <pre><code>/usr/local/mysql-5.5.24-osx10.6-x86_64/data/Dannys-Mac-Pro.local.err
  
  120515 18:07:43 mysqld_safe mysqld from pid file /usr/local/mysql-5.5.24-osx10.6-x86_64/data/Dannys-Mac-Pro.local.pid ended
  120515 18:13:01 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql-5.5.24-osx10.6-x86_64/data
  120515 18:13:01 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/mysql-5.5.24-osx10.6-x86_64/data/ is case insensitive
  120515 18:13:01 [Note] Plugin 'FEDERATED' is disabled.
  /usr/local/mysql-5.5.24-osx10.6-x86_64/bin/mysqld: Table 'mysql.plugin' doesn't exist
  120515 18:13:01 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
  120515 18:13:01 InnoDB: The InnoDB memory heap is disabled
  120515 18:13:01 InnoDB: Mutexes and rw_locks use GCC atomic builtins
  120515 18:13:01 InnoDB: Compressed tables use zlib 1.2.3
  120515 18:13:01 InnoDB: Initializing buffer pool, size = 128.0M
  120515 18:13:01 InnoDB: Completed initialization of buffer pool
  120515 18:13:01 InnoDB: highest supported file format is Barracuda.
  120515 18:13:01  InnoDB: Waiting for the background threads to start
  120515 18:13:02 InnoDB: 1.1.8 started; log sequence number 1595675
  120515 18:13:02 [ERROR] /usr/local/mysql-5.5.24-osx10.6-x86_64/bin/mysqld: unknown option '--skip-locking'
  120515 18:13:02 [ERROR] Aborting
  
  120515 18:13:02  InnoDB: Starting shutdown...
  120515 18:13:03  InnoDB: Shutdown completed; log sequence number 1595675
  120515 18:13:03 [Note] /usr/local/mysql-5.5.24-osx10.6-x86_64/bin/mysqld: Shutdown complete
  
  120515 18:13:03 mysqld_safe mysqld from pid file /usr/local/mysql-5.5.24-osx10.6-x86_64/data/Dannys-Mac-Pro.local.pid ended
  </code></pre>
  
  <p><strong>Update:</strong> I upgraded the same machine from Snow Leopard to Mountain Lion 10.8.1 and MySQL works perfectly fine now with the upgrade, I had to do nothing extra. </p>