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' &gt;&gt; ~/.bash_profile as explained in this answer.