I tried to follow the instructions in How to add MySQL to $PATH variable to resolve "mysql: command not found"?
$ echo 'export PATH="/usr/local/mysql/bin:$PATH"' >> ~/.bash_profile
zsh: permission denied: /Users/naveenkumarp/.bash_profile
Can any one help me to solve this issue?
Best Answer
I would use the
nano
editor to edit the correct file for your shell, which is zsh, not bash.Put this line in at the top of the file
Put this line towards the bottom and save:
Press the control key and the X key to exit (see the bottom of the nano window for more commands). If you then quit your terminal app, you can test for
mysql
being in your path.You can tell your shell with
echo $SHELL
and if you want bash since all your instructions are in it, you can go back to that if needed withchsh /bin/bash
in which case you would nano the file ~/.bash_profile since each shell reads different start up files. I recommend learningzsh
and finding guides that work there, though.