I uninstalled newest mysql and tried to install mysql 5.7 on Mac by downloading from offical website, however it said the previous version is still installed on my Mac. I tried all methods I found, and they didn't work. I also couldn't found any mysql files on my Mac. So I installed mysql using home brew. And the path is {/usr/local/Cellar/[email protected]/5.7.29}. I followed some method and opened bash_profilescreenshot
I changed path to {/usr/local/Cellar/[email protected]/5.7.29/bin}, and I still got a command not found. I once also get mysql running by using {brew services start [email protected]}, but when I type {mysql -u root -p} it showed: " /usr/local/mysql/bin/mysql: No such file or directory".
Really appreciate it if anyone know what's the problem here.
Causes of the 'Command Not Found' Error The 'Command Not Found' error indicates that your system was not able to locate the program you want to run. Two of the most common reasons for this error are: 1. Corrupt MySQL installation: In some instances, the MySQL installation process might be corrupted.
Open macOS system preferences and select the MySQL preference panel, and then execute Start MySQL Server. The Instances page includes an option to start or stop MySQL, and Initialize Database recreates the data/ directory.
i had this problem too. looks like the installer isn't creating the symlink for some reason. this should fix it.
cd /usr/local/bin
ln -s ../Cellar/[email protected]/5.7.29/bin/mysql mysql
As Homebrew says
[email protected] is keg-only, which means it was not symlinked into /usr/local, because this is an alternate version of another formula.
If you need to have [email protected] first in your PATH, run:
echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.zshrc
Reload zsh config after installed.
source ~/.zshrc
Or open a new terminal.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With