Unable to run mysql in terminal using ampps or XAMPP
For Ampps:
sudo nano ~/.bash_profile
Add the line below on bash_profile:
export PATH=$PATH:/Applications/AMPPS/mysql/bin
Restart terminal.
For Xampp:
1. Go to Terminal
2. Enter which php: If it says /usr/bin/php, then proceed to 3.
3. Enter sudo nano ~/.bash_profile (or sudo vim ~/.bash_profile if you know how to use it)
4. Then paste this export PATH="/Applications/XAMPP/xamppfiles/bin:$PATH"
5. Ctrl - O then enter to save, then ctrl - X to exit.
6. Type cd ~
7. type . .bash_profile
8. Restart terminal.
9. Enter which php: If you did it right, it should be the same as the path in #4.
Ref:
https://stackoverflow.com/questions/13892904/how-do-i-access-mysql-from-mac-terminal-using-xampp
Leave a Reply