Homebrew Mariadb



I have been attempting to install MariaDB on a new MacBook with Catalina installed using Homebrew. However, I hit an issue with the post-install step failing which meant the installation didn’t work. I’m sharing how I managed to successfully install MariaDB here for anyone else that hits a similar problem.

Fxcoudert wants to merge 2 commits into Homebrew: master from fxcoudert: mariadb. Closed mariadb: fix for ARM #70060. Fxcoudert wants to merge 2 commits into Homebrew: master from fxcoudert: mariadb. Conversation 6 Commits 2 Checks 6 Files changed Conversation. Developing on your Mac? Get the latest stable MariaDB version on OS X easily with Homebrew. See this step by step guide on installing MariaDB 10.4.13.

Homebrew Mariadb

To start with I have used Homebrew to install MariaDB on my Mac. I ran brew doctor to make sure there were no problems with Homebrew and resolved anything that came up with the suggested fixes.

Next I did the install for MariaDB.

At this point MariaDB should have successfully installed and I should have been able to run mysql. Unfortunately for me post-install failed with the following message:

The important bit to note here was that there were conflicting my.cnf configuration files. Update to mac os. To resolve this, I needed to locate where these files were so that they could be removed:

This returned the path to the file causing post-install to fail. I made a backup of this for precaution and removed the original.

With the configuration file removed I was able to retry post-install:

This ran successfully. MariaDB had successfully installed and could be run via mysql. All that was left to do was set up a root password for mysql and do a bit of a clean-up by removing the backed up my.cnf file.

Homebrew Mariadb

https://mariadb.com/kb/en/mariadb/building-mariadb-on-mac-os-x-using-homebrew/

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 brew), all you have to do is:

Compiling MariaDB

Homebrew Mariadb

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

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

Installing MariaDB

Once that is complete, you need to do the following:

Homebrew Mariadb My.cnf

When you run mysql_install_db, you will see the following output:

Starting MariaDB

Once that is complete, and if you are running this in a production instance, please remember to run mysql_secure_installation. If you’re just testing it, follow the instructions to start it out:

And that’s done! Now you can just run mysql -uroot and login.

Using MariaDB

Homebrew Mariadb Reset Root Password

Upgrading MariaDB

First you need to update your brew installation. You do this by issuing the brew update command. Next you simply run:

You may see error messages as follows if you are running OS X 10.7:

Homebrew mariadb default root password

You can safely ignore these errors and upgrade to 5.5.28 without issue. Latest ios on mac.

Known Issues

Currently (5.3 series), the default compile has some engines that are missing. This is noted via:

Why are there no binaries for Mac on the download page

Mariadb

MariaDB is an open source project and to be able to provide binaries for a platform we need someone to:

Homebrew Mariadb

  • Provide a Mac OSX buildbot slave where we can do the builds.
  • Help us creating proper Mac OSX packages.
  • Sponsor us with a Mac OSX machine for the builds.