.bashrc says:
PATH=$PATH:/usr/local/mysql/bin/:$HOME/.rvm/bin # Add RVM to PATH for scripting
but mysql -u root returns
-bash: mysql: command not found
but if I do /usr/local/mysql/bin/mysql -u root
everything works fine. Why isn’t it search using PATH?
Thanks
You need to either use:
Or add the
export PATHstatement after this statement.The changes you are making are not surviving beyond the execution of your
.bashrc. Addingexportbefore your assignment (orexport PATH) later will ensure that your changes are exported to your shell’s child processes.