Building MariaDB on Mac OS X using Homebrew

You are viewing an old version of this article. View the current version here.

Work has been done to provide MariaDB via the Homebrew package manager, which has been described as the missing package manager for Mac OS X. Once you have installed Homebrew (with the command line <tt>brew</tt>), all you have to do is:

brew update

You can then run searches (<tt>brew search mariadb</tt>) , and if you would like to get more information about it, you could do: <tt>brew info mariadb</tt>. When you're ready to install MariaDB, simply execute:

brew install mariadb

As of MariaDB 5.2.6, it will pull in readline, and the output will be similar to below:

lovegood:~ byte$ brew install mariadb
Warning: It appears you have Macports or Fink installed
Software installed with other package managers causes known problems for
Homebrew. If formula fail to build uninstall Macports/Fink and reinstall any
affected formula.
Also installing dependencies: readline
==> Downloading ftp://ftp.cwru.edu/pub/bash/readline-6.2.tar.gz
######################################################################## 100.0%
==> Downloading patches
######################################################################## 100.0%
==> Patching
patching file vi_mode.c
patching file callback.c
==> ./configure --prefix=/usr/local/Cellar/readline/6.2.1 --mandir=/usr/local/Ce
==> make install
==> Caveats
This formula is keg-only, so it was not symlinked into /usr/local.

OS X provides the BSD libedit library, which shadows libreadline.
In order to prevent conflicts when programs look for libreadline we are
defaulting this GNU Readline installation to keg-only.


Generally there are no consequences of this for you.
If you build your own software and it requires this formula, you'll need
to add its lib & include paths to your build variables:

  LDFLAGS: -L/usr/local/Cellar/readline/6.2.1/lib
  CPPFLAGS: -I/usr/local/Cellar/readline/6.2.1/include
==> Summary
/usr/local/Cellar/readline/6.2.1: 32 files, 2.1M, built in 31 seconds
==> Downloading http://ftp.osuosl.org/pub/mariadb/mariadb-5.2.6/kvm-tarbake-jaun
######################################################################## 100.0%
==> ./configure --without-docs --without-debug --disable-dependency-tracking --p
==> make install
==> Caveats
Set up databases with:
    unset TMPDIR
    mysql_install_db

If this is your first install, automatically load on login with:
    cp /usr/local/Cellar/mariadb/5.2.6/com.mysql.mysqld.plist ~/Library/LaunchAgents
    launchctl load -w ~/Library/LaunchAgents/com.mysql.mysqld.plist

If this is an upgrade and you already have the com.mysql.mysqld.plist loaded:
    launchctl unload -w ~/Library/LaunchAgents/com.mysql.mysqld.plist
    cp /usr/local/Cellar/mariadb/5.2.6/com.mysql.mysqld.plist ~/Library/LaunchAgents
    launchctl load -w ~/Library/LaunchAgents/com.mysql.mysqld.plist

Note on upgrading:
    We overwrite any existing com.mysql.mysqld.plist in ~/Library/LaunchAgents
    if we are upgrading because previous versions of this brew created the
    plist with a version specific program argument.

Or start manually with:
    mysql.server start
Warning: m4 macros were installed to "share/aclocal".
Homebrew does not append "/usr/local/share/aclocal"
to "/usr/share/aclocal/dirlist". If an autoconf script you use
requires these m4 macros, you'll need to add this path manually.
==> Summary
/usr/local/Cellar/mariadb/5.2.6: 231 files, 44M, built in 10.9 minutes

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.