在CentOS中安裝Mysql
阿新 • • 發佈:2018-01-23
環境 路徑 log http linux 簡單 linu 5.7 yum
參考文檔 http://www.linuxidc.com/Linux/2016-09/135288.htm
安裝環境: CentOS7 64位
安裝版本: mysql5.7版本
安裝mysql有使用yum在線安裝也可以離線安裝,這裏只提供比較簡單在線在線安裝方式。
https://dev.mysql.com/downloads/repo/yum/
拉到最下面有下載選項:
獲得下載路徑,進行下載:
wget https://repo.mysql.com//mysql57-community-release-el7-11.noarch.rpm
安裝mysql源
yum installmysql57-community-release-el7-11.noarch.rpm
檢查mysql源
yum repolist enabled | grep "mysql.*-community.*"
調整mysql源的默認版本號:(修改對應版本下的enabled即可) 1啟用 0不啟用
vim /etc/yum.repos.d/mysql-community.repo
安裝mysql服務
yum install mysql-community-server
啟動mysql服務
systemctl start mysqld
查看服務狀態
systemctl status mysqld
在CentOS中安裝Mysql