当前位置: 首页 > 工具软件 > MySQL Client > 使用案例 >

【CentOS7】安装 mysql client 5.7

任伟
2023-12-01

前言

  • CentOS Linux release 7.6.1810
  • mysql 5.7.31

下载rpm

需要下载下面这三个rpm:

  • mysql-community-common-5.7.31-1.el7.x86_64.rpm
  • mysql-community-libs-5.7.31-1.el7.x86_64.rpm
  • mysql-community-client-5.7.31-1.el7.x86_64.rpm
wget https://cdn.mysql.com/archives/mysql-5.7/mysql-community-common-5.7.31-1.el7.x86_64.rpm
wget https://cdn.mysql.com/archives/mysql-5.7/mysql-community-libs-5.7.31-1.el7.x86_64.rpm
wget https://cdn.mysql.com/archives/mysql-5.7/mysql-community-client-5.7.31-1.el7.x86_64.rpm

如果上述地址不可用,尝试在这里找找新的地址:
https://downloads.mysql.com/archives/community/

安装

yum install -y mysql-community-common-5.7.31-1.el7.x86_64.rpm
yum install -y mysql-community-libs-5.7.31-1.el7.x86_64.rpm
yum install -y mysql-community-client-5.7.31-1.el7.x86_64.rpm

检查是否安装成功

shell> mysql -V
mysql  Ver 14.14 Distrib 5.7.31, for Linux (x86_64) using  EditLine wrapper

远程连接mysql

shell> mysql -hxxx.xxx.0.3 -uroot -pmysql-secret
 类似资料: