CentOS 將VestaCP的MariaDB更新到10.2

Roy
·
·
IPFS
·

VestaCP預設的MariaDB版本是5.5,不過現在最新的是10.2版本,為了效能和安全性最好都是更新到最新版。
進行資料庫升級前,建議先做完整的備份避免發生問題導致無法復原!!

先停止mysql,然後將mariadb 5.5完全刪除,但數據庫不會被刪除,不必擔心。

service mariadb stop / service mysql stop 
yum remove mariadb mariadb-server

安裝mariadb 10.2倉庫

yum install nano epel-release -y

創建並編輯文件

nano /etc/yum.repos.d/mariadb.repo

然後將下面的資料貼上

# MariaDB 10.2 CentOS repository list - created 2018-02-15 08:21 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.2/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

之後我們將安裝Mariadb 10.2

yum install MariaDB-server MariaDB-client -y

然後啟用 mariadb啟動並啟動服務

systemctl enable mysql
service mysql start

最後執行一下檢查更新

mysql_upgrade

確認一下版本是否已經更新的

mysql -v
CC BY-NC-ND 2.0

Like my work? Don't forget to support and clap, let me know that you are with me on the road of creation. Keep this enthusiasm together!

RoyBackend Developer 曾在遊戲公司開發維護金流系統,使用 GCP、Linode 管理Linux伺服器 現在專注在 WordPress開發、代管,有空發表一下技術文章 個人部落格 https://rdfarm.net/
  • Author
  • More

【網域轉移】輕鬆從Godaddy 將網址轉移到NameCheap

將VestaCP 網站搬家到 HestiaCP 全視覺化主機管理工具

解決WordPress MU搭配Nginx出現頁面跑版