這篇文章主要介紹了Centos7使用yum安裝Mysql5.7.19的詳細步驟,小編覺得挺不錯的,現在分享給大家,也給大家做個參考。一起跟著小編過來看看吧
Centos7的yum來源中預設是沒有mysql,因為現在已經用mariaDB取代mysql了。
首先我們下載mysql的repo來源,我們可以去mysql官網找最新的repo來源位址
位址:
##https: //dev.mysql.com/downloads/repo/yum///下载mysql rpm包 # wget http://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm //安装mysql rpm包 # rpm -ivh mysql57-community-release-el7-11.noarch.rpm //安装mysql # yum install mysql-community-server
# service mysqld restart
[root@local bin]# grep "password" /var/log/mysqld.log 2017-09-24T08:03:30.664086Z 1 [Note] A temporary password is generated for root@localhost: 8A3xwbk8_P1A
#
[root@local bin]# mysql -uroot -p Enter password:
mysql> SET password=PASSWORD("mysql123"); ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
mysql>grant all privileges on *.* to username@'%' identified by 'password';
以上是Centos7如何利用yum安裝Mysql5.7.19的具體方法的詳細內容。更多資訊請關注PHP中文網其他相關文章!