在 macbook 上用 brew 安装 mysql ,运行:
mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
此命令后提示:
mysql_install_db: [ERROR] unknown variable 'tmpdir=/tmp'
2015-11-27 14:57:57 [ERROR] Unrecognized options
I also encountered such a problem, and this is how I solved it for the time being. I downloaded the dmg format installation package from the mysql official website, installed it, and then added the mysql path to .bash_profile. This is how I used it for the time being. Submitted this issue.
Refer to this problem I encountered before: http://segmentfault.com/q/1010000004078668?_ea=496690