怎么在服务器上只安装mysql客户端,来进行远程备份和操作mysql.
centos 7 仅安装mysql client
1、 添加rpm源
[root@k8s-master ~]# rpm -ivh https://repo.mysql.com//mysql57-community-release-el7-11.noarch.rpm
2、通过yum搜索
[root@test2 ~]# yum search mysql-community
3、导入秘钥
rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022
4、安装x64位的 mysql客户端
[root@test2 ~]# yum install mysql-community-client.x86_64 -y
如果你不想安装GPG KEY的话,可以试试在yum install 版本后面加上 –nogpgcheck,即可绕过GPG验证成功安装,如下:
yum -y install mysql-community-client.x86_64 --nogpgcheck
使用命令连接数据库
mysql -h主机地址 -u用户名 -p用户密码 -P端口
本文暂时没有评论,来添加一个吧(●'◡'●)