how to run and connect to multiple MySQL on the same machine.
以RPM方式安装MySQL
以下命令来自于icoding的老师:
1、下载rpm包
wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.28-1.el7.x86_64.rpm-bundle.tar
# 如果提示需要账号密码,就用这个方式下载
# wget --http-user=youremail@email.com --http-passwd=yourpassword https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.28-1.el7.x86_64.rpm-bundle.tar
2、查看系统是否自带mariadb
rpm -qa | grep mariadb
3、将查出的mariadb进行卸载
rpm -e --nodeps mariadb-libs-5.5.64-1.el7.x86_64
4、把刚刚下载的mysql tar解压
tar -xvf mysql-5.7.28-1.el7.x86_64.rpm-bundle.tar
5、在解压目录安装如下4个mysql核心包
rpm -ivh mysql-community-common-5.7.28-1.el7.x86_64.rpm
rpm -ivh mysql-community-libs-5.7.28-1.el7.x86_64.rpm
rpm -ivh mysql-community-client-5.7.28-1.el7.x86_64.rpm
rpm -ivh mysql-community-server-5.7.28-1.el7.x86_64.rpm
6、安装到server时缺少依赖报错
error: Failed dependencies:
libaio.so.1()(64bit) is needed by mysql-community-s