Why?
Environment variables were not set properly to add to the system PATH.
Environment
- mysql Ver 8.4.1 for macos14 on arm64 (MySQL Community Server - GPL)
- nvm 0.39.7
Steps
Open Terminal and edit the Zsh configuration file
.zshrc
using vi or other IDE you liked1
vi ~/.zshrc
Add the following contents inside and save
command not found:mysql
1
export PATH=${PATH}:/usr/local/mysql/bin/
command not found:nvm
1
2export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvmReload the Zsh configuration
.zshrc
to take effect1
source ~/.zshrc
Validate
1
2
3
4# MySQL
mysql --version
# NVM
nvm --version
References
About this Post
This post is written by Andy, licensed under CC BY-NC 4.0.