Install MariaDB on OS X Yosemite 10.10

Use Homebrew to install MariaDB on your Mac. MySQL has a dmg, MariaDB does not. I recently switched to MariaDB for three main reasons:

  1. The influence of big names like Google and Wikipedia making the move as well.
  2. Michael Widenius the creator of MySQL is running the project.
  3. Works with SequalPro, Querious* and Navicat out of the box.

If you already have MySQL installed you will need to backup all your databases and uninstall MySQL. Remove the plist LaunchDaemon, if you added one to Yosemite. Restart your computer.

Article installation notes

Ben Stillman has a great article over on MariaDB.com/blog covering how to install MariaDB, check the link below and my notes to go with it.

Article on how to install MariaDB 10.

Be sure to watch the OS X terminal as you go through the article for information on different levels of configuration.

  • Step 4: You will need to install Homebrew using instructions from http://brew.sh/
  • Step 6: Watch the terminal for your start up plist LaunchDaemon instructions.
  • Step 7: You are probably installing a later version. You will want to cd into the directory with the version you installed.
  • Step 11: If you see MySQL in your version you need to uninstall MySQL. You should’t run MySQL and MariaDB.

Quick and dirty install

For those who have a little more experience these are the brief installation instructions.

I’m installing 10.0.17 your version might be different.

> xcode-select --install
> ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
> brew update
> brew install mariadb
> unset TMPDIR
> cd /usr/local/Cellar/mariadb/10.0.17/
> ln -sfv /usr/local/opt/mariadb/*.plist ~/Library/LaunchAgents
> mysql_install_db
> mysql.server start
> mysql_secure_installation
> cd ~
> touch .my.cnf # your mysql config

Now log into MariaDB and check your version.

>  mysql -u root -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or g.
Your MariaDB connection id is 6
Server version: 10.0.17-MariaDB Homebrew

Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

MariaDB [(none)]> select @@version;
+-----------------+
| @@version       |
+-----------------+
| 10.0.17-MariaDB |
+-----------------+
1 row in set (0.00 sec)

Author: Kevin

Howdy, I’m Kevin Dees. I’m the founder of Robojuice. It is a web strategy company focused on delivering a refined experience to partners. I’m also the creator of TypeRocket for WordPress.