[MySQL] Setting in Mac OS shell

Rex Chiang
Sep 11, 2021

--

Add PATH environment variable for current bash window

1. Open the bash_profile.

vim ~/.bash_profile

2. Add PATH environment variable.

export PATH=/usr/local/mysql/bin:$PATH

3. Activate the bash_profile.

source ~/.bash_profile

Add PATH environment variable as permanent setting

1. Open the zshrc.

vim ~/.zshrc

2. Add the block to activate bash_profile when open the zsh shell tool.

if [ -f ~/.bash_profile ]; then
source ~/.bash_profile
fi

3. Activate the zshrc.

source ~/.zshrc

--

--

No responses yet