点击查看代码
rpm -qa | grep mariadb //查看本机是否安装 mariadb
rpm -e mariadb-libs-5.5.68-1.el7.x86_64 --nodeps //强制删除mariadb
rpm -qa | grep mariadb //检查是否删除成功
cd /usr/local/ //进入安装路径
ll
mkdir mysql
ll
cd mysql
wget https://cdn.mysql.com/archives/mysql-5.5/MySQL-5.5.50-1.el7.x86_64.rpm-bundle.tar //下载MySQL5.5.50安装包
ls
tar -zxiv MySQL-5.5.50-1.el7.x86_64.rpm-bundle.tar
rpm -ivh MySQL-devel-5.5.50-1.el7.rpm //顺序安装
rpm -ivh MySQL-client-5.5.50-1.el7.rpm
rpm -ivh MySQL-test-5.5.50-1.el7.rpm
rpm -ivh MySQL-embedded-5.5.50-1.el7.rpm
rpm -ivh MySQL-shared-compat-5.5.50-1.el7.rpm
rpm -ivh MySQL-shared-5.5.50-1.el7.rpm
rpm -ivh MySQL-server-5.5.50-1.el7.rpm
systemctl status mysql //查看mysql服务的状态
systemctl start mysql // 启动mysql服务
systemctl status mysql // 检查mysql服务的状态
mysqladmin -uroot -p password "新密码" //刚安装的MySQL5.5.50是没有密码的
[设置密码可以参考](https://www.cnblogs.com/used-conduit-onion/p/18078526)