在本人寫做這篇安裝MySQL文章時,雖然MySQL已經發布到8.0.17版本,但對於行業來講,主力版本依然是5.7版本。目前在Linux環境默認安裝時,大部分已經默認安裝到8版本了,因此本人特地寫一篇安裝5.7版本的記錄,用於幫助新手朋友及本人之後用到。mysql
[root@qinshengfei ~]# wget https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm
[root@qinshengfei ~]#yum localinstall mysql57-community-release-el7-11.noarch.rpm
[root@qinshengfei ~]# yum install -y mysql-community-server
[root@qinshengfei ~]# service mysqld start
[root@qinshengfei ~]# grep 'temporary password' /var/log/mysqld.log
[root@qinshengfei ~]# mysql -u root -p
mysql>ALTER USER 'root'@'localhost' IDENTIFIED BY 'QWErt123!@#';
mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'QWErt123!@#' WITH GRANT OPTION;
PS:本人在發佈完安裝篇的文章後,會陸續發佈spring boot、spring cloud、redis等相關的文章,歡迎關注、討論技術redis
歡迎你們關注公衆號:一凡碼農spring