zsh: command not found: mysql
You should try paste this line to your environment variables
export PATH=${PATH}:/usr/local/mysql/bin/
Then try restart your environment variables with the following command
source ~/.zshrc #If you use Oh-My-Zsh
source ~/.bashrc #If you use Default Bash
On the latest MacOS Catalina. I have tried to do above to solve this problem;
vi ~/.zshrc // open the zsh config and edite
export PATH=${PATH}:/usr/local/mysql/bin/ // to add these words
source ~/.zshrc // make it work
Reopen a teminal and run mysql -u root -p
,input the password then you can login your mysql;
On MacOs Catalina Open a terminal and run.
sudo nano /etc/paths
Added to end of file
/usr/local/mysql/bin
Save the changes and quit. Reloaded terminal. Open a new terminal and run.
mysql -u root -p
Its works for me.!!