I successfully installed mariadb, but MAMP continues to use the copy of mysql located in its bin folder; specifically:
/Applications/MAMP/Library/bin/mysql
H
MAMP uses MAMP/bin/startMysql.sh to start mysql. Try to change it.