折雨的天空

新浪微薄腾讯微薄

最新碎语:最近霉到了住。哎。。。

您的位置:折雨的天空 >其他技术> Linux备份MySQL只安装mysqldump,以及两个错误的解决办法

Linux备份MySQL只安装mysqldump,以及两个错误的解决办法

实际上就是安装MySQL的client即可。

网上直接yum install mysql-client肯定是不行的。

参照:https://blog.csdn.net/zp8126/article/details/137084854

上面文章是安装的MySQL server,但是我们是安client,具体步骤如下:



wget http://dev.mysql.com/get/mysql80-community-release-el7-8.noarch.rpm

下载repo包,然后安装,rpm或者yum localinstall都可以。



下一步:


yum install -y mysql-community-client --skip-broken --nogpgcheck

安装成功。通过命令查看安装情况:



[root@ecm-be41 bin]# rpm -qa |grep mysql
mysql-community-client-plugins-8.0.36-1.el7.x86_64
mysql-community-common-8.0.36-1.el7.x86_64
mysql-community-libs-8.0.36-1.el7.x86_64
mysql-community-client-8.0.36-1.el7.x86_64
mysql80-community-release-el7-8.noarch
mysql-community-libs-compat-8.0.36-1.el7.x86_64
[root@ecm-be41 bin]# mysqldump 
Usage: mysqldump [OPTIONS] database [tables]
OR     mysqldump [OPTIONS] --databases [OPTIONS] DB1 [DB2 DB3...]
OR     mysqldump [OPTIONS] --all-databases [OPTIONS]
For more options, use mysqldump --help
[root@ecm-be41 bin]# 

文中省略了两个错误,就是yum命令中带的那两个参数,也说说,第一个--skip-broken


没有这个参数的话,会报错:


Error: Package: mysql-community-client-8.0.36-1.el9.x86_64 (/mysql-community-client-8.0.36-1.el9.x86_64)
           Requires: libstdc++.so.6(GLIBCXX_3.4.20)(64bit)
Error: Package: mysql-community-client-8.0.36-1.el9.x86_64 (/mysql-community-client-8.0.36-1.el9.x86_64)
           Requires: libc.so.6(GLIBC_2.33)(64bit)
 You could try using --skip-broken to work around the problem
** Found 2 pre-existing rpmdb problem(s), 'yum check' output follows:
ctcss-agent-3.5.5-1.el8.x86_64 is a duplicate with ctcss-agent-3.4.5-1.el7.x86_64
ctcss-agent-3.7.4-1.el7.x86_64 is a duplicate with ctcss-agent-3.5.5-1.el8.x86_64

没有第二个参数,--nogpgcheck,会报错:

Downloading packages:
warning: /var/cache/yum/x86_64/7/mysql80-community/packages/mysql-community-client-plugins-8.0.36-1.el7.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID a8d3785c: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql


The GPG keys listed for the "MySQL 8.0 Community Server" repository are already installed but they are not correct for this package.
Check that the correct key URLs are configured for this repository.


 Failing package is: mysql-community-client-plugins-8.0.36-1.el7.x86_64
 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022, file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

------------正 文 已 结 束, 感 谢 您 的 阅 读 (折雨的天空)--------------------

转载请注明本文标题和链接:《Linux备份MySQL只安装mysqldump,以及两个错误的解决办法

奖励一下

取消

分享不易,烦请有多多打赏,如您也困难,点击右边关闭即可!

扫码支持
扫码打赏,5元,10元,你说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

-秒后自动关闭,如已打赏,或者不愿打赏,请点击右上角关闭图标。

发表评论

路人甲 表情
看不清楚?点图切换