After attempting to use homebrew to install MySQL on my Mac OSX 10.9.4 Mavericks machine and running into a bunch of issues I found this awesome tool. I was able to run it over-top of my failed MySQL install and it worked like a charm.

Here are some of the errors I was receiving:

When Starting MySQL:

Starting MySQL
. ERROR! The server quit without updating PID file (/usr/local/var/mysql/C02H40HGDV7L.pid).

When trying to run the install DB script:

mysql_install_db --verbose --user=whoami --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
WARNING: Could not write to config file /usr/local/opt/mysql/my-new.cnf: Permission denied

Installing MySQL system tables...2014-08-20 10:56:38 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2014-08-20 10:56:38 18860 [Warning] Can't create test file /usr/local/var/mysql/C02H40HGDV7L.lower-test
2014-08-20 10:56:38 18860 [Warning] Can't create test file /usr/local/var/mysql/C02H40HGDV7L.lower-test
2014-08-20 10:56:38 18860 [Note] InnoDB: Using atomics to ref count buffer pool pages
2014-08-20 10:56:38 18860 [Note] InnoDB: The InnoDB memory heap is disabled
2014-08-20 10:56:38 18860 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2014-08-20 10:56:38 18860 [Note] InnoDB: Compressed tables use zlib 1.2.3
2014-08-20 10:56:38 18860 [Note] InnoDB: Using CPU crc32 instructions
2014-08-20 10:56:38 18860 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2014-08-20 10:56:38 18860 [Note] InnoDB: Completed initialization of buffer pool
2014-08-20 10:56:38 18860 [ERROR] InnoDB: ./ibdata1 can't be opened in read-write mode
2014-08-20 10:56:38 18860 [ERROR] InnoDB: The system tablespace must be writable!
2014-08-20 10:56:38 18860 [ERROR] Plugin 'InnoDB' init function returned error.
2014-08-20 10:56:38 18860 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2014-08-20 10:56:38 18860 [ERROR] Unknown/unsupported storage engine: InnoDB
2014-08-20 10:56:38 18860 [ERROR] Aborting

2014-08-20 10:56:38 18860 [Note] Binlog end
2014-08-20 10:56:38 18860 [Note] /usr/local/opt/mysql/bin/mysqld: Shutdown complete`