您好,登錄后才能下訂單哦!
本篇文章為大家展示了如何在Centos7環境中安裝mysql 8.0.13,內容簡明扼要并且容易理解,絕對能使你眼前一亮,通過這篇文章的詳細介紹希望你能有所收獲。
環境說明
?操作系統:Centos7.4 (CentOS-7-x86_64-Minimal-1804.iso)
?mysql:mysql8.0.13
?卸載系統自帶的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
安裝依賴環境
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
關閉防火墻
systemctl stop firewalld.service systemctl disable firewalld.service
禁用selinux
vi /etc/selinux/config
將SELINUX=enforcing改為SELINUX=disabled
reboot 重啟機器
從網易鏡像下載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,確保已經卸載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
初始化數據庫
mysqld --initialize --console
目錄授權,否則啟動失敗
chown -R mysql:mysql /var/lib/mysql/
啟動服務
systemctl start mysqld
加密
mysql_secure_installation
其他
其他操作和yum安裝方式一樣,不再重復。
安裝perl所有模塊
yum install -y perl-Module-Install.noarch
上述內容就是如何在Centos7環境中安裝mysql 8.0.13,你們學到知識或技能了嗎?如果還想學到更多技能或者豐富自己的知識儲備,歡迎關注億速云行業資訊頻道。
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。