Linux login MySQL error, resolve bash: mysql: command not found the method

 Reason: This is because the system default looks for commands in / usr / bin, if the command is not in this directory, of course, will not find the command, we need to do is to map a link under / usr / bin directory, which is equivalent establish a link file.

First of all have to know the full path to the command mysql or mysqladmin command, such as mysql path is: / usr / local / mysql / bin / mysql, we can execute this command:

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

 

Guess you like

Origin www.cnblogs.com/zhainan-blog/p/11935476.html