#在linux上安装mysql 1.使用yum仓库安装 2.使用Oracle的RPM软件包在Linux上安装MySQL (1).下载并解压MySQL-5.7.26-1.el7.x86_64的rpm捆绑包 #wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.26-1.el7.x86_64.rpm-bundle.tar #tar -xvf {path}/mysql-5.7.26-1.el7.x86_64.rpm-bundle.tar mysql-community-embedded-devel-5.7.26-1.el7.x86_64.rpm mysql-community-libs-5.7.26-1.el7.x86_64.rpm mysql-community-embedded-5.7.26-1.el7.x86_64.rpm mysql-community-test-5.7.26-1.el7.x86_64.rpm mysql-community-embedded-compat-5.7.26-1.el7.x86_64.rpm mysql-community-common-5.7.26-1.el7.x86_64.rpm mysql-community-devel-5.7.26-1.el7.x86_64.rpm mysql-community-client-5.7.26-1.el7.x86_64.rpm mysql-community-server-5.7.26-1.el7.x86_64.rpm mysql-community-libs-compat-5.7.26-1.el7.x86_64.rpm (2).使用yum安装依赖及软件包(yum免去依赖包烦恼) 注意:检查linux系统自带的mariadb-libs是否已删除! (mysql用户一般系统已创建) #yum -y install gcc gcc-c++ make pcre pcre-devel zlib-devel zlib openssl-devel libiao-devel.x86_64 #yum -y install mysql-community-{server,client,common,libs}-* #grep password /var/log/mysqld.log