How to add the PATH for mysql bin on Mac? I want to add the PATH for mysql.exe on my Mac. I tried this via terminal, but 

$ vi.bash_profile
vi.bash_profile command not found.


does not work. I tried this for generating the bash_profile to add the PATH.

We want to enter the code

export PATH=PATH:/Machintosh HD/Application/mampstack-7.3.8-0/mysql/bin


after the generating bash_profile.
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.