cd /usr/local/mysqlls 查看一下有无bincd binvi /etc/profile 在最后添加:export PATH=$PATH:/usr/local/mysql/bin 保存退出。 是修改生效:source /etc/profile mysql命令可以使用了。