2

I installed MySQL 5.7.24 via Homebrew on MacOS Mojave v 10.14.4 per this gist. Now, I'm trying to remove it, but can't.

When I run brew remove mysql I get Error: No available formula or cask with the name "mysql".

I can run brew uninstall --force mysql and follow all the instructions from the post linked below, but I can't get brew remove mysql to work.

How to uninstall MySQL 5.6 when installed by brew on macOS?

Here are the steps I'm following:

# stop mysql
brew services stop mysql@5.7

# force uninstall
brew uninstall --force mysql

# check for running instances
ps -ax | grep mysql | grep -v grep
# no running process to kill

brew remove mysql
brew cleanup
sudo rm /usr/local/mysql
sudo rm -rf /usr/local/var/mysql
sudo rm -rf /usr/local/mysql*
sudo rm ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
sudo rm -rf /Library/StartupItems/MySQLCOM
sudo rm -rf /Library/PreferencePanes/My*
launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
rm -rf ~/Library/PreferencePanes/My*
sudo rm -rf /Library/Receipts/mysql*
sudo rm -rf /Library/Receipts/MySQL*
sudo rm -rf /private/var/db/receipts/*mysql*

# restart computer

After all of this, when I run mysql --version I get mysql Ver 14.14 Distrib 5.7.24, for osx10.9.

Also, I thought that maybe I needed to specify mysql@5.7 instead of just mysql, but I still get the same error.

user8121557
  • 149
  • 2
  • 9

1 Answers1

0

It works with the version number.

brew uninstall --force mysql@5.7

screenshotstrong text