Home > Database > Mysql Tutorial > mysql:commandnotfound问题解决_MySQL

mysql:commandnotfound问题解决_MySQL

WBOY
Release: 2016-06-01 13:00:58
Original
1199 people have browsed it

编译安装mysql后经常碰到这个问题,明明有安装mysql的嘛
根本原因在于:mysql命令没有加载到当前用户的环境变量中
解决办法

#find / -name mysql

/usr/local/mysql/bin/mysql


方法1:临时解决办法
创建链接文件:
ln -s /usr/local/mysql/bin/mysql /usr/bin


方法2:永久解决办法
将mysql的bin目录加入环境变量

#echo "export PATH=/usr/local/mysql/bin:\$PATH" >> /root/.bash_profile

#source /root/.bash_profile

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template