您好,登錄后才能下訂單哦!
本篇文章為大家展示了如何在Centos7環(huán)境中安裝mysql 8.0.13,內(nèi)容簡明扼要并且容易理解,絕對能使你眼前一亮,通過這篇文章的詳細(xì)介紹希望你能有所收獲。
環(huán)境說明
?操作系統(tǒng):Centos7.4 (CentOS-7-x86_64-Minimal-1804.iso)
?mysql:mysql8.0.13
?卸載系統(tǒng)自帶的mariadb-lib
?查看mariadb版本
rpm -qa|grep mariadb mariadb-libs-5.5.56-2.el7.x86_64
?卸載mariadb
rpm -e mariadb-libs-5.5.56-2.el7.x86_64 --nodeps
安裝依賴環(huán)境
yum install -y openssl-devel.x86_64 openssl.x86_64 yum install -y libaio.x86_64 libaio-devel.x86_64 yum install -y perl.x86_64 perl-devel.x86_64 yum install -y perl-JSON.noarch yum install -y autoconf yum install -y wget yum install -y net-tools
關(guān)閉防火墻
systemctl stop firewalld.service systemctl disable firewalld.service
禁用selinux
vi /etc/selinux/config
將SELINUX=enforcing改為SELINUX=disabled
reboot 重啟機(jī)器
從網(wǎng)易鏡像下載mysql安裝包集合
?下載完整安裝包并解壓
wget https://mirrors.163.com/mysql/Downloads/MySQL-8.0/mysql-8.0.13-1.el7.x86_64.rpm-bundle.tar tar -xvf mysql-8.0.13-1.el7.x86_64.rpm-bundle.tar
?下載必要安裝包(二選一)
wget https://mirrors.163.com/mysql/Downloads/MySQL-8.0/mysql-community-common-8.0.13-1.el7.x86_64.rpm wget https://mirrors.163.com/mysql/Downloads/MySQL-8.0/mysql-community-libs-8.0.13-1.el7.x86_64.rpm wget https://mirrors.163.com/mysql/Downloads/MySQL-8.0/mysql-community-client-8.0.13-1.el7.x86_64.rpm wget https://mirrors.163.com/mysql/Downloads/MySQL-8.0/mysql-community-server-8.0.13-1.el7.x86_64.rpm
按順序安裝
?必要安裝(注意順序)
?安裝common
?安裝lib 依賴于common,確保已經(jīng)卸載mariadb
?依賴于libs
?依賴于client、common
rpm -ivh mysql-community-common-8.0.13-1.el7.x86_64.rpm rpm -ivh mysql-community-libs-8.0.13-1.el7.x86_64.rpm rpm -ivh mysql-community-client-8.0.13-1.el7.x86_64.rpm rpm -ivh mysql-community-server-8.0.13-1.el7.x86_64.rpm
?非必要安裝(注意順序)
rpm -ivh mysql-community-libs-compat-8.0.13-1.el7.x86_64.rpm rpm -ivh mysql-community-embedded-compat-8.0.13-1.el7.x86_64.rpm rpm -ivh mysql-community-devel-8.0.13-1.el7.x86_64.rpm rpm -ivh mysql-community-test-8.0.13-1.el7.x86_64.rpm
初始化數(shù)據(jù)庫
mysqld --initialize --console
目錄授權(quán),否則啟動失敗
chown -R mysql:mysql /var/lib/mysql/
啟動服務(wù)
systemctl start mysqld
加密
mysql_secure_installation
其他
其他操作和yum安裝方式一樣,不再重復(fù)。
安裝perl所有模塊
yum install -y perl-Module-Install.noarch
上述內(nèi)容就是如何在Centos7環(huán)境中安裝mysql 8.0.13,你們學(xué)到知識或技能了嗎?如果還想學(xué)到更多技能或者豐富自己的知識儲備,歡迎關(guān)注億速云行業(yè)資訊頻道。
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。