mysql5.6 / bin / mysql无法正常工作

时间:2016-08-06 13:06:30

标签: mysql linux bash

#why my  mysql5.6's /bin/mysql can't  use?

aiapple@aiapple:/usr/local/mysql55/bin$ echo $PATH
/usr/local/mysql55/bin:/usr/local/mysql56/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

#mv the mysql5.5's mysql
aiapple@aiapple:/usr/local/mysql55/bin$ mv mysql Mysql

#cp the mysql5.6's mysql
aiapple@aiapple:/usr/local/mysql55/bin$ cp -ar /usr/local/mysql56/bin/mysql .
aiapple@aiapple:/usr/local/mysql55/bin$ mysql -V
bash: /usr/local/mysql55/bin/mysql: No such file or directory
aiapple@aiapple:/usr/local/mysql55/bin$ ls -al mysql
-rwxr-xr-x 1 aiapple aiapple 7840392  5月 17 07:40 mysql
#it do not work 

#But  the mysql5.5's mysql can work
aiapple@aiapple:/usr/local/mysql55/bin$ rm -rf mysql

aiapple@aiapple:/usr/local/mysql55/bin$ mv Mysql mysql
aiapple@aiapple:/usr/local/mysql55/bin$ mysql -V
mysql  Ver 14.14 Distrib 5.5.50, for linux2.6 (x86_64) using readline 5.1
#it works

0 个答案:

没有答案