問題一、解決Linux:bash: mysql: 未找到命令…
1、查看MySQL服務是否啟動
systemctl status mysql
2、查看MySQL運行環(huán)境
echo $PATH(可查看所有服務位置)
3、暫停MySQL服務
service MySQL stop
4、在/etc/profile配置系統(tǒng)環(huán)境變量
export PATH=$PATH:(MySQL的bin目錄)
5、讓profile文件立即生效
source /etc/profile或./etc/profile
抄錄于秀_兒
二、文件搜索失敗: cannot update repo ‘a(chǎn)ppstream’: Cannot prepare internal mirrorlist: No URLs in mirrorlist
解決 Failed to search for file: cannot update repo ‘a(chǎn)ppstream’: Cannot prepare internal mirrorlist: No URLs in mirrorlist
因為Centos 8已經(jīng)停止維護,所以需要改變鏡像。文章來源:http://www.zghlxwxcb.cn/news/detail-509649.html
cd /etc/yum.repos.d/
sudo sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sudo sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
抄錄于Javier_Ji文章來源地址http://www.zghlxwxcb.cn/news/detail-509649.html
到了這里,關于解決Linux:-bash: mysql: 未找到命令 問題的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網(wǎng)!