执行命令:

mysql -V

报错内容:
-bash: mysql: command not found
centos 解决  mysql command not found

报错原因:系统默认会查找/usr/bin下的命令,如果这个命令不在这个目录下,当然会找不到命令,我们需要做的就是映射一个链接到/usr/bin目录下

解决步骤:
1、找到mysql的安装了路径

whereis mysql

centos 解决  mysql command not found
2、确定安装路径在/usr/local/mysql/bin/mysql 下后,创建一个软连接

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

3、再次验证

mysql -V

centos 解决  mysql command not found

相关文章:

  • 2022-01-28
  • 2022-01-28
  • 2021-07-13
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-22
猜你喜欢
  • 2021-08-22
  • 2021-11-03
  • 2022-12-23
  • 2022-12-23
  • 2021-04-25
  • 2021-10-07
  • 2021-08-18
相关资源
相似解决方案