How to add the PATH for mysql bin on Mac?

You need a space after vi and before the . so vi .bash_profile not vi.bash_profile.

If you are not in your home folder you can also use vi ~/.bash_profile to specify the location as mentioned in ankiis answer below/above. Again you need a space after the vi.

Alternatively, instead of using vi you can add your path to .bash_profileusing echo 'export PATH=/my/path:$PATH' >> ~/.bash_profile as explained in this answer.


Bash profile can be reached at ~/.bash_profile. I don't use vim, but nano ~/.bash_profile works. Hope vim is similar too.