本文介绍: 解决 Failed to search for file: cannot update repoappstream’: Cannot prepare internal mirrorlist: No URLs in mirrorlist。因为Centos 8已经停止维护,所以需要改变镜像。4、在/etc/profile配置系统环境变量。5、让profile文件立即生效。1、查看MySQL服务是否启动。2、查看MySQL运行环境。3、暂停MySQL服务

问题一、解决Linuxbash: mysql: 未找到命令

1、查看MySQL服务是否启动

 systemctl status mysql

2、查看MySQL运行环境

 echo $PATH(可查看所有服务位置

3、暂停MySQL服务

 service MySQL stop

4、在/etc/profile配置系统环境变量

export PATH=$PATH:(MySQL的bin目录)

5、让profile文件立即生效

 source /etc/profile或./etc/profile

抄录于秀_儿

二、文件搜索失败: cannot update repoappstream’: Cannot prepare internal mirrorlist: No URLs in mirrorlist

解决 Failed to search for file: cannot update repoappstream’: Cannot prepare internal mirrorlist: No URLs in mirrorlist
因为Centos 8已经停止维护,所以需要改变镜像

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

原文地址:https://blog.csdn.net/qq_61407171/article/details/129418117

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任

如若转载,请注明出处:http://www.7code.cn/show_21836.html

如若内容造成侵权/违法违规/事实不符,请联系代码007邮箱suwngjj01@126.com进行投诉反馈,一经查实,立即删除

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注