centos7仅安装mysql/mongodb客户端
仅安装MySQL客户端# 添加rpm源[root@k8s-master ~]# rpm -ivh https://repo.mysql.com//mysql57-community-release-el7-11.noarch.rpm[root@test1 ~]## 通过yum搜索[root@test1 ~]# yum search mysql-community[root@test1 ...
·
1、仅安装MySQL客户端
# 添加rpm源
[root@k8s-master ~]# rpm -ivh https://repo.mysql.com//mysql57-community-release-el7-11.noarch.rpm
[root@test1 ~]#
# 通过yum搜索
[root@test1 ~]# yum search mysql-community
[root@test1 ~]#
# 安装x64位的 mysql客户端
[root@test1 ~]# yum install mysql-community-client.x86_64
2、仅安装MongoDB客户端
下载相关版本mongodb客户端 client
linux上选择rpm
rpm 安装客户端
apt-get install rpm -y
rpm -ivh https://repo.mongodb.org/yum/amazon/2013.03/mongodb-org/4.0/x86_64/RPMS/mongodb-org-shell-4.0.25-1.amzn1.x86_64.rpm --nodeps --force
测试连接
mongo --port 22222 --host 10.0.0.0 --authenticationDatabase "admin" -u "root" -p "password"
报错处理
1、
Failing package is: mysql-community-common-5.7.38-1.el7.i686
GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
解决
出现上述提示原因是Mysql的GPG升级了,需要重新获取
sudo rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022
再次安装即可
更多推荐
已为社区贡献10条内容
所有评论(0)