Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Trouble reinstalling mysql on OSX Mavericks

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.

like image 560
yyttr3 Avatar asked Jan 22 '26 00:01

yyttr3


1 Answers

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.

like image 125
Travis Avatar answered Jan 24 '26 21:01

Travis



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!