Closed kdurski closed 7 years ago
I could probably do that but I will loose all mysql data from "old" directory /usr/local/Cellar/mysql56/5.6.34/ since new one will be /usr/local/Cellar/mysql@5.6/5.6.34/
Fear not: all your data is in /usr/local/var
and not removed on uninstall.
I am not sure what was the reason for moving a few formulas from versions to core, but it seems that there is no migration and its causing a few issues with this new formula name format. I know I could install new formula, rename the directory under /usr/local/Cellar, remove old formula, old service plist and start service again, but I don't think this is intended.
There is a migration but unfortunately I screwed it up for a (relatively) short window with MySQL 5.6 specifically which you seem to have hit. Your best bet in this case is to:
brew uninstall --force mysql56 mysql@5.6
rm -rf /usr/local/Cellar/mysql@5.6 /usr/local/Cellar/mysql56 ~/Library/LaunchAgents/*mysql56* ~/Library/LaunchAgents/*mysql5@6*
brew prune
brew install mysql@5.6
brew services restart mysql@5.6
Sorry for the inconvenience.
Thanks, I did what you suggested and its almost working now :) Now I can see only 1 service, its running but brew services cleanup
is complaining about it for some reason:
2.0.0 ~ kamil% brew services cleanup
Warning: Service homebrew.mxcl.mysql@5.6 not managed by `brew services` => skipping
All user-space services OK, nothing cleaned...
2.0.0 ~ kamil% brew services list
Name Status User Plist
httpd24 started root /Library/LaunchDaemons/homebrew.mxcl.httpd24.plist
kafka started kamil /Users/kamil/Library/LaunchAgents/homebrew.mxcl.kafka.plist
mysql@5.6 started kamil /Users/kamil/Library/LaunchAgents/homebrew.mxcl.mysql@5.6.plist
php54 stopped
postgresql stopped
rabbitmq started kamil /Users/kamil/Library/LaunchAgents/homebrew.mxcl.rabbitmq.plist
redis started kamil /Users/kamil/Library/LaunchAgents/homebrew.mxcl.redis.plist
zookeeper started kamil /Users/kamil/Library/LaunchAgents/homebrew.mxcl.zookeeper.plist
What does ls -lha /Users/kamil/Library/LaunchAgents/homebrew.mxcl.mysql@5.6.plist
output? Does brew services cleanup
still output that after brew services restart mysql@5.6
? If so, could try a stop
and start
manually.
Mike,
Yes, it still outputs that error even after full reinstall:
2.0.0 ~ kamil% ls -lha /Users/kamil/Library/LaunchAgents/homebrew.mxcl.mysql@5.6.plist
-rw------- 1 kamil staff 597B 9 gru 16:44 /Users/kamil/Library/LaunchAgents/homebrew.mxcl.mysql@5.6.plist
2.0.0 ~ kamil% brew services restart mysql@5.6
Stopping `mysql@5.6`... (might take a while)
==> Successfully stopped `mysql@5.6` (label: homebrew.mxcl.mysql@5.6)
==> Successfully started `mysql@5.6` (label: homebrew.mxcl.mysql@5.6)
2.0.0 ~ kamil% brew services cleanup
Warning: Service homebrew.mxcl.mysql@5.6 not managed by `brew services` => skipping
All user-space services OK, nothing cleaned...
2.0.0 ~ kamil% brew services stop mysql@5.6
Stopping `mysql@5.6`... (might take a while)
==> Successfully stopped `mysql@5.6` (label: homebrew.mxcl.mysql@5.6)
2.0.0 ~ kamil% mysql -u root
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
2.0.0 ~ kamil% brew services start mysql@5.6
==> Successfully started `mysql@5.6` (label: homebrew.mxcl.mysql@5.6)
2.0.0 ~ kamil% mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
2.0.0 ~ kamil% brew services cleanup
Warning: Service homebrew.mxcl.mysql@5.6 not managed by `brew services` => skipping
All user-space services OK, nothing cleaned...
Try:
brew services stop mysql@5.6
rm -rf /Users/kamil/Library/LaunchAgents/homebrew.mxcl.mysql@5.6.plist
brew services restart mysql@5.6
brew services cleanup
I'm afraid problem persists :(
Seriously, what is going on with brew and specific versions in general? I'm having tons of problems lately. I am also needing specific versions of ansible and I'm having the exact same problems as this thread.
Please follow the general troubleshooting steps first:
brew update
and retried your prior step?brew doctor
, fixed as many issues as possible and retried your prior step?Bug reports:
I have
mysql56
(5.6.34), which (I believe) is installed fromhomebrew/versions
tap and set up as service throughbrew services start mysql56
. However it seems this formula it got moved tohomebrew/core
recently with new name -mysql@5.6
and this is causing a few issues for me - both formulas are installed, only old one is running but neither can be managed by brew-services. Here are some steps to reproduce it:brew services list
does not display itbrew services cleanup
forhomebrew.mxcl.mysql56.plist
finds new formula namemysql@5.6
which points tohomebrew.mxcl.mysql@5.6.plist
and fails to clean it upbrew upgrade
automatically installsmysql@5.6
(5.6.34) and complains about files being already present, suggest unlinking them and linking new formula/usr/local/Cellar/mysql56/5.6.34/
since new one will be/usr/local/Cellar/mysql@5.6/5.6.34/
After installing
mysql@5.6
together withmysql56
its visible twice in new format when runningbrew services list
but neither can be started / managed via services:I am not sure what was the reason for moving a few formulas from versions to core, but it seems that there is no migration and its causing a few issues with this new formula name format. I know I could install new formula, rename the directory under /usr/local/Cellar, remove old formula, old service plist and start service again, but I don't think this is intended.
Some debugging information:
And running
brew upgrade
with only mysql56 installed: