MySQL: 改变Homebrew安装MySQL/MariaDB的数据库文件目录
1. brew install mariadb
2. mysql_install_db --verbose --user=$USER --basedir=/usr/local/Cellar/mariadb/10.1.8 --datadir="/Volumes/KG's Big YO/Documents/mysql_data" --tmpdir=/tmp
3. 修改mysql.server脚本文件(/usr/local/Cellar/mariadb/10.1.8/bin)中的datadir="/Volumes/KG's Big YO/Documents/mysql_data"
最后启动MySQL:
mysql.server start
Done.