I successfully installed mariadb, but MAMP continues to use the copy of mysql located in its bin folder; specifically:
/Applications/MAMP/Library/bin/mysql
How do I get MAMP to use mariadb, which in my case is located in /usr/local/bin/mysql?
I tried creating a symbolic link in MAMP's bin folder to point to /usr/local/bin, but that didn't work. Hmm.
here's how i do it so that you can use either mysql or mariadb since mariadb is a drop in replacement (typing this from memory, so please let me know if there are some mistakes)...
0) make a backup of your mysql db dir just in case, and do some mysql prep just in case
1) make a copy or take note of some settings in your my.cnf file. It can be located in a variety of different places, so to find them all (there are a bunch):
2) figure out which my.cnf was loaded (for MAMP, it MAY be in /Applications/MAMP/conf/my.cnf)
3) make a backup of the my.cnf in /etc/my.cnf and edit my.cnf to make sure it's got a few parameters in there, most importantly the port, socket, and datadir settings so that mariadb will know where to look for your db files:
4) add any mariadb specific config options you may want in a [mariadb] section
5) install mariadb (i like using brew, but pick your poison)... and you can really do this any time
6) make a symbolic link from the my.conf from step two
6a) you can put your my.cnf anywhere, as long as there's a copy or link to it in /etc/my.cnf... the goal here is to have mariadb and MAMP's implementation of mysql use the same config settings.
7) now make a shell shell script to load apache and mariadb
8) get/take note of the current start/stop script for apache (it'll prob won't be anything fancy)
9) get the installed mariadb path, and make sure it's the mariadb version
10) now edit startSomething.sh
11) do the same for stopSomething.sh
12) that's it!. to start or stop things
if you want the vanilla MAMP, use the MAMP app that came with MAMP. otherwise, have fun with this slightly faster database with a bunch of fun new features... but keep in mind that while mariadb is by design a drop in replacement for mysql, it's not true the other way around (MariaDB v MySQL compatibility)
MAMP uses MAMP/bin/startMysql.sh to start mysql. Try to change it.