How to install & use an older version of mariadb or mysql

(Eric Poe) #1

The current version of MariaDB is 10.2. I would like to use v10.1 in my local dev environment.

To install, I can do brew install mariadb@10.1. But I don’t get a /usr/bin/mysql as a result. What is the proper way to install MariaDB v10.1 and it have the same functionality/usage in OS X as it did when it was what was installed via brew install mariadb prior to the release of v10.2?

I would imagine that the answer would be the same for mysql@55, mysql@56, and the current mysql (v 5.7).

(Mike McQuaid) #2

As the brew install output shows:

This formula is keg-only, which means it was not symlinked into /usr/local,
because this is an alternate version of another formula.

If you need to have this software first in your PATH run:
  echo 'export PATH="/usr/local/opt/mariadb@10.1/bin:$PATH"' >> ~/.zshrc

So: you need to add it to your PATH.