在学习mysql过程中,修改环境变量后报错。
[root@localhost mysql]# vim /etc/profile
[root@localhost mysql]# source /etc/profile
[root@localhost mysql]# mysql -V
bash: mysql: command not found...
[root@localhost mysql]# userdel mysql
bash: userdel: command not found...
[root@localhost mysql]# id mysql
bash: id: command not found...
Similar commands are::
'ed'
'od'
[root@localhost home]# ls
bash: ls: command not found...
Similar command is: 'lz'
[root@localhost /]# vim /etc/profile
bash: vim: command not found...
解决办法:
执行:export PATH=/bin:/usr/bin:$PATH
[root@localhost mysql]# export PATH=/bin:/usr/bin:$PATH
[root@localhost mysql]# ls
mysql-5.7.26-el7-x86_64