[Mac Error]-bash: mysql: command not found

First try:

ln -s /usr/local/mysql/bin/mysql /usr/bin/mysql

Prompt: operation not permitted

Again, add sudo to attach administrator permissions, and still prompt: operation not permitted

Then try:

Create and edit the file.
vim ~/.bash_profile
Add.
export PATH=$PATH:/usr/local/mysql/bin
Save, exit

As a result, even MySQL still reported an error

Reexecution:

source ~/.bash_profile

Done

is summarized as follows:

1. create and edit the file: vim ~/.bash_profile.
2. Add export PATH=$PATH:/usr/local/mysql/bin
3. Save and exit wq
4. Execute to take effect           source ~/.bash_profile;

Similar Posts: