1.沒法鏈接外網
2.沒法使用yum源安裝node
cat /etc/redhat-release mysql
uname -r linux
rpm -qa|grep mariadb #查找mariadb
rpm -e --nodeps mariadb-libs-5.5.60-1.el7_5.x86_64 #卸載sql
rpm -qa | grep mysql
使用命令rpm -e --nodeps {-file-name}進行移除操做,移除的時候可能會有依賴,要注意必定的順序。數據庫
按照依賴關係依次安裝rpm包 依賴關係依次爲common→libs→client→server服務器
rpm -ivh mysql-community-common-5.7.22-1.el7.x86_64.rpm
rpm -ivh mysql-community-libs-5.7.22-1.el7.x86_64.rpm
rpm -ivh mysql-community-client-5.7.22-1.el7.x86_64.rpm
rpm -ivh mysql-community-server-5.7.22-1.el7.x86_64.rpm
rpm -ivh mysql-community-devel-5.7.31-1.el7.x86_64.rpmide
如有如下報錯:
ui
再次安裝:
操作系統
注意:ivh中, i-install安裝;v-verbose進度條;h-hash哈希校驗3d
systemctl start mysqld.service 啓動mysql
systemctl status mysqld.service 查看mysql狀態
netstat -anop|grep 3306
grep 'temporary password' /var/log/mysqld.log
mysql -uroot -pzo(ojOhiI6jS
解決密碼設置強度不夠問題:
Your password does not satisfy the current policy requirments
1: 更改策略,設置 validate_password_policy=0;
校驗級別最低,只校驗密碼長度,只要長度跟validate_password_length同樣便可,默認長度是8位。能夠經過:
mysql> set global validate_password_policy=0;
修改有效密碼長度:mysql> set global validate_password_length=1;
Query OK, 0 rows affected (0.00 sec)
無論設置 validate_password_length=1,仍是2,3,4 ,‘有效密碼長度’這個參數的實際值都是4。超過4後設置是多少實際就是多少。2:重設密碼:
mysql> set password for root@localhost=password('1234');