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.

 

原文:http://ytll21-ghost.daoapp.io/mysql-gai-bian-homebrewan-zhuang-mysql-mariadbde-shu-ju-ku-wen-jian-mu-lu/

你可能感兴趣的:(MySQL: 改变Homebrew安装MySQL/MariaDB的数据库文件目录)