ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
Get updates from http://brew.sh/
After brew is installed, go to your /etc/paths/
and move /usr/local/bin/
above /usr/bin/
. Restart terminal and you are good to go.
MariaDB is an enhanced, drop-in replacement for MySQL, which means that it's completely compatible with MySQL. You do not have to change any functions to use MariaDB instead of Mysql, it will just work fine. Install MariaDB using the following commands:
$ brew install mariadb
When MariaDB is installed, we need to install the databases, therefore issue following commands:
$ unset TMPDIR
$ mysql_install_db --user=`whoami` --basedir="$(brew --prefix mariadb)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
MariaDB comes with a standard login "root" and the password "root". If you'd like to change this you can run this command:
$ '/usr/local/opt/mariadb/bin/mysqladmin' -u root password 'new-password'
Or, if you don't want this to be in your ~/.bash_history file, you might rather use:
$ '/usr/local/opt/mariadb/bin/mysql_secure_installation'
Now, to start the MariaDB server you can run:
$ mysql.server start
Or, if you want your server to boot when you login to your computer issue this command once:
$ ln -sfv /usr/local/opt/mariadb/*.plist ~/Library/LaunchAgents
Refer to https://github.com/Homebrew/homebrew-php - JoseGonzalez has merged his repo with homebrew.