Xshell终端输入mysql -u root -p

出现错误:-bash: mysql: command not found

输入:alias mysql=/usr/local/mysql/bin/mysql

再重复mysql -u root -p,输入mysql口令即可