title: mysql_install_db, error: 35, on a Mac OS X 10.9.1
body: <p>Background: I've just updated OS X to Mavericks, then I removed brew(and everything I installed via homebrew) using:<code>rm -rf /usr/local</code> and began to reinstall everything.</p>
  
  <p>After <code>brew install mysql</code>, I tried:</p>
  
  <pre><code>unset TMPDIR
  $ mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
  </code></pre>
  
  <p>But I got:</p>
  
  <pre><code>mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
  Installing MySQL system tables...2014-02-12 16:43:45 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
  2014-02-12 16:43:45 2358 [Note] InnoDB: Using atomics to ref count buffer pool pages
  2014-02-12 16:43:45 2358 [Note] InnoDB: The InnoDB memory heap is disabled
  2014-02-12 16:43:45 2358 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
  2014-02-12 16:43:45 2358 [Note] InnoDB: Compressed tables use zlib 1.2.3
  2014-02-12 16:43:45 2358 [Note] InnoDB: Using CPU crc32 instructions
  2014-02-12 16:43:45 2358 [Note] InnoDB: Initializing buffer pool, size = 128.0M
  2014-02-12 16:43:45 2358 [Note] InnoDB: Completed initialization of buffer pool
  2014-02-12 16:43:45 2358 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 35
  2014-02-12 16:43:45 2358 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
  2014-02-12 16:43:45 2358 [Note] InnoDB: Retrying to lock the first data file
  2014-02-12 16:43:46 2358 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 35
  2014-02-12 16:43:46 2358 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
  </code></pre>
  
  <p>And I got totally lost, and started googling, I only fond this, which seems to be helpful: <a href="http://blog.tiagocarvalho.pt/2014/01/mac-os-x-mysql-problems.html" rel="noreferrer">http://blog.tiagocarvalho.pt/2014/01/mac-os-x-mysql-problems.html</a></p>
  
  <p>After read that post, still did not get a clear picture, but what in my mind was to (according to that post):
  FIRST: kill -9 (the mysql PID) and THEN (I think) I should be able to try <code>mysql_install_db</code> again.</p>
  
  <p>So I tried, the <code>ps xua | grep mysql</code> showed:</p>
  
  <pre><code>4683   0.0  0.0  2442000    624 s001  S+    7:39下午   0:00.01 grep mysql
  4547   0.0  3.3  3080024  68276   ??  S     7:18下午   0:00.98 /usr/local/Cellar/mysql/5.6.16/bin/mysqld --basedir=/usr/local/Cellar/mysql/5.6.16 --datadir=/usr/local/var/mysql --plugin-dir=/usr/local/Cellar/mysql/5.6.16/lib/plugin --log-error=/usr/local/var/mysql/UU.local.err --pid-file=/usr/local/var/mysql/UU.local.pid
  4476   0.0  0.0  2436436    808   ??  S     7:18下午   0:00.02 /bin/sh /usr/local/bin/mysqld_safe
  </code></pre>
  
  <p>BUT, after <code>kill -9 4547</code> and <code>kill -9 4476</code>, they showed up again with two different PID...</p>
  
  <p>I don't know what is going on... Any hint?</p>
  
  <p>ALSO, if I do <code>mysql.server stop</code>, then <code>mysql.server status</code> I'll find it restarts...</p>