无法在OSX Mavericks上重新安装mysql

yyt*_*tr3 3 mysql sql database macos terminal

我正在尝试在我的计算机上重新安装mysql(os x mavericks)并且我已完成以下错误:

bash <(curl -Ls http://git.io/eUx7rg)
Run Code Online (Sandbox Code Playgroud)

错误:

Starting MySQL
... ERROR! The server quit without updating PID file (/usr/local/mysql/data/christians-mbp.saumag.edu.pid).
/usr/local/mysql/support-files/mysql.server: line 362: pidof: command not found
/dev/fd/63: line 119: SORRY, MySQL IS NOT RUNNING ... THERE MUST BE A PROBLEM: command not found
Run Code Online (Sandbox Code Playgroud)

所以我决定看看卸载它,如果它已经存在:

brew uninstall mysql
bash <(curl -Ls http://git.io/eUx7rg)
Run Code Online (Sandbox Code Playgroud)

这说明mysql目前仍在安装,所以我做了以下事情:

sudo rm /usr/local/mysql
sudo rm -rf /usr/local/mysql*
sudo rm -rf /Library/StartupItems/MySQLCOM
sudo rm -rf /Library/PreferencePanes/My*
edit /etc/hostconfig and remove the line MYSQLCOM=-YES-
sudo rm -rf /Library/Receipts/mysql*
sudo rm -rf /Library/Receipts/MySQL*
sudo rm -rf /var/db/receipts/com.mysql.*

bash<(curl -Ls http://git.io/eUx7rg)
Run Code Online (Sandbox Code Playgroud)

这给了我与以前相同的错误消息,所以我决定重做上面的所有rm命令,包括编辑并运行以下命令:

ps -ax | grep mysql
brew cleanup
sudo rm ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
sudo rm -rf /Library/StartupItems/MySQLCOM
brew doctor
brew update
brew install mysql
unset TMPDIR
mysql_install_db --verbose --user=`yyttr3` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
Run Code Online (Sandbox Code Playgroud)

在最后一个命令后,我收到以下错误消息:

dyld: Library not loaded: @@HOMEBREW_PREFIX@@/opt/openssl/lib/libssl.1.0.0.dylib
  Referenced from: /usr/local/opt/mysql/bin/my_print_defaults
  Reason: image not found
FATAL ERROR: Neither host 'christians-mbp.saumag.edu' nor 'localhost' could be looked     up with
 /usr/local/opt/mysql/bin/resolveip
Please configure the 'hostname' command to return a correct
Run Code Online (Sandbox Code Playgroud)

主机名.如果要在以后解决此问题,请使用--force选项重新启动此脚本

我真的不知道问题是什么,我不确定我是否正确安装它.从我所看到的,这应该是一个安装mysql的好方法.如果你有什么想法我会非常感激.

Tra*_*vis 8

我相信你现在已经解决了这个问题,但我遇到了同样的问题.对于其他任何偶然发现的人:

对我来说,这是OpenSSL的一个问题.

resolveip `hostname`
Run Code Online (Sandbox Code Playgroud)

如果它说没有加载OpenSSL,

brew uninstall openssl
brew install openssl
Run Code Online (Sandbox Code Playgroud)

然后再试一次.希望这可以帮助.