我在我的 Mac 上使用 Homebrew 安装了 mysql。这是mysql的最新版本(5.7.9)。我按照此link中的说明进行操作。一切都很顺利,直到我不得不运行命令
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'
2016-01-18 16:52:42 [ERROR] Unrecognized options
最佳答案
mysql_install_db
命令 has been deprecated从版本 5.7.6 开始,因此您链接的指南不再有效:
mysql_install_db
is deprecated as of MySQL 5.7.6 because its functionality has been integrated intomysqld
, the MySQL server. To initialize a MySQL installation, invokemysqld
with the--initialize
or--initialize-insecure
option. For more information, see Section 2.10.1.1, “Initializing the Data Directory Manually Using mysqld”.mysql_install_db
will be removed in a future MySQL release.
关于mysql - 无法在我的用户帐户下运行 mysql,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34864825/