CentOS下MySQL移至MariaDB

Google都將MySQL移至MariaDB了,個人朋友也Ubuntu下移至MariaDB,我仍是不能落後吧,今天將CentOS下MySQL移至MariaDB。總結下個人步驟:php

一、備份

首先是備份,保證全部數據安全,具體備份我就不詳細說了。mysql

二、卸載MySQL相關

yum remove mysql-*

卸載掉全部MySQL相關。sql

三、安裝MariaDB

mkdir /Download
cd /Download
wget http://yum.mariadb.org/5.5/centos6-amd64/rpms/MariaDB-5.5.33a-centos6-x86_64-client.rpm
wget http://yum.mariadb.org/5.5/centos6-amd64/rpms/MariaDB-5.5.33a-centos6-x86_64-common.rpm
wget http://yum.mariadb.org/5.5/centos6-amd64/rpms/MariaDB-5.5.33a-centos6-x86_64-compat.rpm
wget http://yum.mariadb.org/5.5/centos6-amd64/rpms/MariaDB-5.5.33a-centos6-x86_64-server.rpm
rpm -U MariaDB*

這裏注意下載的MariaDB版本,個人是CentOS 6 64bit的,其餘版本能夠在http://yum.mariadb.org/找到對應後下載。centos

四、重啓MariaDB

MariaDB安裝後,經常使用命令都和MySQL同樣,MySQL的service是mysqld,而MariaDB的service是mysql。安全

chkconfig mysql on
service mysql restart

五、總

MariaDB安裝後,phpMyAdmin同樣使用,經常使用命令也和MySQL同樣。各位親升級請必定先備份數據,我不抱賠償哦~娃哈哈。rest

原文:http://xiedexu.cn/centos-mysql-to-mariadb.htmcode

相關文章
相關標籤/搜索