Prepare the database (MySQL), if you already have MySQL, can be ignored.
Build MySQL table;
Connect to MySQL;
Mysql-u root-p
Create a data table;
Mysql> CREATE DATABASE demo;
Mysql> use demo;
Mysql> CREATE TABLE Pet (name varchar (), owner varchar (+), species varchar (+), sex char (1));
Add data table contents;
Mysql> INSERT into pet values (' Brandon ', ' Jack ', ' Puddle ', ' m '), (' Dixie ', ' Danny ', ' Chihuahua ', ' f ');
Exit (); ----Quit MySQL
Backup MySQL;
Previously prompt, enable binary;
Backup data table; backup my.cnf;
$ mysqldump--all-databases--user=root--password--master-data > Backupdb.sql
$ sudo cp/etc/mysql/my.cnf/opt/my.cnf.bak
Del MySQL;
Stop the MySQL service;
$ sudo service MySQL stop//rhel6
$ sudo systemctl stop MySQL//RHEL7
$ sudo/etc/init.d/mysql Stop//rhel6
Removing MySQL configuration and files;
$ sudo yum remove mysql* mysql-server mysql-devel mysql-libs
$ sudo rm-rf/var/lib/mysql
Build mariadb;
Install mariadb; and related dependency packages;
$ sudo vi/etc/yum.repos.d/mariadb.repo//Create a custom Yum source
....//The following is the contents of the file.//...../////* * * * * * * *
[MARIADB]
Name = MariaDB
BaseURL = Http://yum.mariadb.org/5.5/centos7-amd64
Gpgkey=https://yum.mariadb.org/rpm-gpg-key-mariadb
Gpgcheck=1
.......................................
$ sudo yum install mariadb-server mariadb-client//installation MariaDB
recover my.cnf files;
$ sudo cp/opt/my.cnf/etc/mysql/
Start mariadb;
$ sudo service mariadb start
$ sudo systemctl start mariadb
$ sudo/etc/init.d/mariadb Start
MySQL ==>> MARIADB;
Import the data table into the MARIADB;
$ mysql-u Root-p < Backupdb.sql
Appear the content, indicates the login success; congratulations.
$ mysql-u Root-p
.....//The following is the SQL command, which ....//..../////..//.
MariaDB [(None)]> show databases;
MariaDB [(None)]> use test01;
MariaDB [test01]> select * from pet;
The end of this article, welcome to visit;
For more information, please click <<MARIADB Official documents >>
MYSQL ==>> MARIADB