我試圖重新安裝MySQL的我的電腦(OS X小牛)上,我已經做了以下錯誤如下:麻煩在OSX小牛重新安裝的MySQL
bash <(curl -Ls http://git.io/eUx7rg)
錯誤:
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
所以我決定去看看卸載它,如果它已經在那裏了:
brew uninstall mysql
bash <(curl -Ls http://git.io/eUx7rg)
這是說MySQL是目前仍然安裝ED,所以我做了以下內容:
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)
這給了我同樣的錯誤信息和以前一樣,所以我決定重做所有的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
最後的命令後,我得到了以下錯誤消息:
dyld: Library not loaded: @@[email protected]@/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
主機名。 如果您想在稍後階段解決此問題,請使用--force選項重新啓動此腳本
我真的不知道問題所在,我不確定我是否安裝了正確的。從我讀過的這個應該是安裝mysql的好方法。如果您對我將不勝感激的任何想法。
這也解決了我的問題。 –
如果其他人在執行此操作後仍然存在問題,請查看此主題https://github.com/Homebrew/homebrew/issues/25665我通過用Xcode.app中的版本替換'/ usr/bin/install_name_tool'解決並重新安裝openssl和mysql與自制軟件 –
修復了我的問題,謝謝! – lefoy