CentOS 6.5/6.6 安裝mysql 5.7
摘自 CentOS 6.5/6.6 安裝mysql 5.7 最完整版教程
Step1: 檢測系統是否自帶安裝mysql
# yum list installed | grep mysql
Step2: 刪除系統自帶的mysql及其依賴
命令:
# yum -y remove mysql-libs.x86_64
Step3: 給CentOS添加rpm源,並且選擇較新的源
命令:# wget dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm
# yum localinstall mysql-community-release-el6-5.noarch.rpm
# yum repolist all | grep mysql
# yum-config-manager --disable mysql55-community
# yum-config-manager --disable mysql56-community
# yum-config-manager --enable mysql57-community-dmr
# yum repolist enabled | grep mysql
Step4:安裝mysql 伺服器
命令:
# yum install mysql-community-server
Step5: 啟動mysql
命令:# service mysqld start
Step6: 查看mysql是否自啟動,並且設置開啟自啟動
命令:# chkconfig --list | grep mysqld
# chkconfig mysqld on
Step7: mysql安全設置
命令:# mysql_secure_installation
參考相關文檔地址:
http://www.rackspace.com/knowledge_center/article/installing-mysql-server-on-centoshttp://dev.mysql.com/doc/refman/5.7/en/linux-installation-yum-repo.htmlhttp://www.cnblogs.com/xiaoluo501395377/archive/2013/04/07/3003278.html
推薦閱讀: