rpm -qa | grep mysql
rpm -qa | grep mariadb
如果存在 卸載!!
rpm -e --nodeps mysql-libs-5.1.73-1.el6.x86_64
rpm -e --nodeps mariadb-libs-5.5.56-2.el7.x86_64
檢查依賴庫:
rpm -qa|grep libaio
rpm -qa|grep net-tools
沒有裝上 yum -y install libaio net-tools
wget http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.16-1.el7.x86_64.rpm-bundle.tar
tar -xvf mysql-5.7.16-1.el7.x86_64.rpm-bundle.ta
rpm -ivh mysql-community-common-5.7.16-1.el7.x86_64.rpm
rpm -ivh mysql-community-libs-5.7.16-1.el7.x86_64.rpm
rpm -ivh mysql-community-client-5.7.16-1.el7.x86_64.rpm
rpm -ivh mysql-community-server-5.7.16-1.el7.x86_64.rpm
注意注意注意注意!!!!!! 按順序依次安裝
如果報這個錯誤
執行這個命令
yum install libnuma*
systemctl start mysqld.service
cat /var/log/mysqld.log | tail -n 10 #看登錄的 用戶和密碼
mysql -uroot -p #登錄
set global validate_password_policy=LOW; // 設置密碼的驗證強度等級為低
ALTER USER 'root'@'localhost' IDENTIFIED BY 'xxxx'; #重置密碼 不要太簡單
5.退出
quit結束戰斗 sqlBoy