linux / mac environment when viewing mysql version: -bash: mysql: command not found

Disclaimer: This article is a blogger original article, shall not be reproduced without the bloggers allowed. https://blog.csdn.net/ethan__xu/article/details/89364872

This shows that the / usr / bin in the environment variable is not mysql

Folder permissions to modify
the sudo -R & lt the chmod 777 / usr / local / MySQL / bin / MySQL
the sudo -R & lt the chmod 777 / usr / bin

  • The mysql environment variable added to the / usr / bin

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

It's done.

Guess you like

Origin blog.csdn.net/ethan__xu/article/details/89364872