注意各家的命令里面的参数不一样,各有特色参数

###Percona版 —-推荐

yum -y install https://www.percona.com/redir/downloads/percona-release/redhat/latest/percona-release-0.1-6.noarch.rpm

yum -y install Percona-Server-client-57 Percona-Server-devel-57 Percona-Server-shared-57

######yum -y install Percona-Server-client-56 Percona-Server-devel-56 Percona-Server-shared-56

#rpm -ql Percona-Server-client-57

1
2
3
4
5
6
7
8
9
10
11
12
/usr/bin/mysql
/usr/bin/mysql_config
/usr/bin/mysql_config-64
/usr/bin/mysql_config_editor
/usr/bin/mysqladmin
/usr/bin/mysqlbinlog
/usr/bin/mysqlcheck
/usr/bin/mysqldump
/usr/bin/mysqlimport
/usr/bin/mysqlpump
/usr/bin/mysqlshow
/usr/bin/mysqlslap

#####mysql 社区版

rpm -ivh https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm

yum install -y mysql-community-client

1
2
3
4
5
6
7
8
9
10
11
#rpm -ql mysql-community-client
/usr/bin/mysql
/usr/bin/mysql_config_editor
/usr/bin/mysqladmin
/usr/bin/mysqlbinlog
/usr/bin/mysqlcheck
/usr/bin/mysqldump
/usr/bin/mysqlimport
/usr/bin/mysqlpump
/usr/bin/mysqlshow
/usr/bin/mysqlslap

#####mariadb版

rpm –import https://yum.mariadb.org/RPM-GPG-KEY-MariaDB

1
2
3
4
5
6
7
cat >> /etc/yum.repos.d/MariaDB.repo << EOF
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.3/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
EOF

yum install MariaDB-client -y

#rpm -ql MariaDB-client

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/etc/my.cnf.d
/etc/my.cnf.d/mysql-clients.cnf
/usr/bin/msql2mysql
/usr/bin/mysql
/usr/bin/mysql_embedded
/usr/bin/mysql_find_rows
/usr/bin/mysql_plugin
/usr/bin/mysql_waitpid
/usr/bin/mysqlaccess
/usr/bin/mysqladmin
/usr/bin/mysqlbinlog
/usr/bin/mysqlcheck
/usr/bin/mysqldump
/usr/bin/mysqlimport
/usr/bin/mysqlshow
/usr/bin/mysqlslap