If you have installed XAMPP on your Mac and have started the service of MySQL, but when you try to connect to the database service via the Terminal, you get "zsh command not found MySQL", well the reason is you have not set the PATH variable.
Steps for the fix:
- Make sure that the MySQL and Apache service is running and that you can able to access the PHPMyAdmin via a web browser on localhost.
- Now go to the Terminal app and move to /Applications folder.
- Next, move to the XAMPP folder and then the bin folder.
- You should be able to see the MySQL binary file here, just do a PWD and copy the path.
% pwd /Applications/XAMPP/bin
- Now add this path to the PATH environment variable:
- Try to connect to MySQL via console now and it should work.
% mysql -u root -p
Have Questions? Post them here!
- How to make zsh as the default shell on Ubuntu
- Resolve - zsh: command not found: code
- Fix - zsh: command not found: conda [macOS]
- zsh: command not found [fix] macOS
- Setting up Zsh Syntax Highlighting
- Fix for zsh: command not found: brew
- Fix zsh: permission denied: script.sh
- [fix] zsh: illegal hardware instruction python TensorFlow M1/M2 Mac
- How to clear ZSH history of commands executed on Mac Terminal
- Ubuntu zsh: command not found: nano
- How to reload zsh shell profile file?
- macOS Ventura 13: The default interactive shell is now zsh
- zsh: exec format error eclipse M1 Mac
- Resolve - zsh: command not found: code - zsh
- [Fix] java: incompatible types: java.lang.String cannot be converted to int - Java
- How to reload zsh shell profile file? - zsh
- Microsoft Edge browser error on MAC - This page is having a problem Try coming back to it later - Microsoft
- ADT quit unexpectedly error on Mac OSX Android Eclipse SDK - Android
- How to SFTP to port different than 22 (SFTP Custom port) - FTP
- Generate Maven Project Dependency Tree using MVN Command - Java
- Project JDK is not defined [IntelliJ IDEA] - Java