Trouble reinstalling mysql on OSX Mavericks

北战南征 提交于 2020-01-02 07:36:09

问题


I'm trying to reinstall mysql on my computer (os x mavericks) and I've done the following with the following errors:

bash <(curl -Ls http://git.io/eUx7rg)

Error:

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

So I decided to see uninstall it if it was already there:

brew uninstall mysql
bash <(curl -Ls http://git.io/eUx7rg)

This says that mysql is currently still installed, so I did the following:

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)

This gave me the same error messages as before, So I decided to redo all the rm commands above, including the edit and run the following commands:

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

After the last command I got the following error message:

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

hostname. If you want to solve this at a later stage, restart this script with the --force option

I don't really know what the problem is, i'm not sure if i'm even installing it right. From what I have read this should be a good way to install mysql. If you have any ideas on what I would greatly appreciate it.


回答1:


I'm sure you've solved this by now, but I just had the same problem. For anyone else who stumbles across this:

For me, it was an issue with OpenSSL.

resolveip `hostname`

If it says OpenSSL isn't loaded,

brew uninstall openssl
brew install openssl

then try again. Hope this helps.




回答2:


I had the same problem. Only solution that I found is to install mysql from source code. The reason for this error to occur and how to solve it is explained in full detail in the following link: http://jaitechwriteups.blogspot.com.au/2010/08/mysql-installation-error-neither-host.html




回答3:


All I had to do was agree XCODE terms by opening XCODE. That fixed everything.



来源:https://stackoverflow.com/questions/23027880/trouble-reinstalling-mysql-on-osx-mavericks

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!