Detailed steps for smooth transition from MySQL to MariaDB

Detailed steps for smooth transition from MySQL to MariaDB

1. Introduction to MariaDB and MySQL

1. Introduction to mariadb

MariaDB was developed by Michael Widenius, the founder of MySQL. He had previously sold his company MySQL AB to SUN for $1 billion. After SUN was acquired by Oracle, the ownership of MySQL also fell into the hands of Oracle. MariaDB is named after Michael Widenius' daughter Maria.

2. Causes of mariadb

MariaDB database management system is a branch of MySQL, mainly maintained by the open source community and licensed under the GPL. One of the reasons for developing this branch is that after Oracle acquired MySQL, there was a potential risk of closing the source of MySQL, so the community adopted the branch method to avoid this risk. MariaDB aims to be fully compatible with MySQL, including API and command line, making it an easy replacement for MySQL. In terms of storage engine, XtraDB is used instead of MySQL's InnoDB.

3. Advantages of MariaDB

  • Free for commercial use (after being acquired by Oracle, MySQL has been divided into community edition and enterprise edition)
  • Maria storage engine
  • PBXT storage engine
  • XtraDB storage engine
  • FederatedX storage engine
  • Faster replication query processing
  • Thread Pool
  • Fewer warnings and bugs
  • Faster operation
  • More Extensions
  • Better functional testing
  • Data table elimination
  • Extended statistics for slow query logs
  • Support for Unicode sorting

4. Started using mariadb

Big companies like Google, Twitter, and Facebook have already or are starting to switch from MySQL to MariaDB.
The new versions of redhat, archlinux, opensuse, slackware, and fedora have already or have announced that mariadb will replace mysql as the default database.
I have always regarded Google as a technology vane. Not long after Oracle acquired MySQL, Google switched to MariaDB, which shows that the future of MySQL is bleak.

2. Install mariadb

1. mariadb source

[root@node1 tank]# cat /etc/yum.repos.d/mariadb.repo //32-bit system [mariadb] 
name=MariaDB 
baseurl=http://yum.mariadb.org/5.5/centos6-x86 
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB 
gpgcheck=1 
 
[root@node1 tank]# cat /etc/yum.repos.d/mariadb.repo //64-bit system [mariadb] 
name=MariaDB 
baseurl=http://yum.mariadb.org/5.5/centos6-amd64 
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB 
gpgcheck=1

2. Delete mysql

I have tested that mysql5.1 and mysql5.5 can be smoothly transferred to mariadb, but mysql5.6.X has not been tested. If you are not sure, you can back it up with mysqldump first. MariaDB cannot be installed without deleting mysql

# yum remove mysql mysql-server

3. Install mariadb

# yum install MariaDB-server MariaDB-client 
 
# yum install MariaDB-Galera-server MariaDB-client galera //With synchronous multi-master cluster features

3. Start and test mariadb

1. Start mariadb

# /etc/init.d/mysql start

2. Test mariadb

[root@node1 ~]# mysql 
Welcome to the MariaDB monitor. Commands end with ; or \g. 
Your MariaDB connection id is 207 
Server version: 5.5.40-MariaDB-wsrep MariaDB Server, wsrep_25.11.r4026 
 
Copyright (c) 2000, 2014, Oracle, Monty Program Ab and others. 
 
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. 
 
MariaDB [(none)]> show engines; 
+--------------------+---------+----------------------------------------------------------------------------+--------------+------+------------+ 
| Engine | Support | Comment | Transactions | XA | Savepoints | 
+--------------------+---------+----------------------------------------------------------------------------+--------------+------+------------+ 
| MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO | 
| CSV | YES | CSV storage engine | NO | NO | NO | 
| BLACKHOLE | YES | /dev/null storage engine (anything you write to it disappears) | NO | NO | NO | 
| MyISAM | YES | MyISAM storage engine | NO | NO | NO | 
| FEDERATED | YES | FederatedX pluggable storage engine | YES | NO | YES | 
| ARCHIVE | YES | Archive storage engine | NO | NO | NO | 
| InnoDB | DEFAULT | Percona-XtraDB, Supports transactions, row-level locking, and foreign keys | YES | YES | YES | 
| PERFORMANCE_SCHEMA | YES | Performance Schema | NO | NO | NO | 
| MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO | 
| Aria | YES | Crash-safe tables with MyISAM heritage | NO | NO | NO | 
+--------------------+---------+----------------------------------------------------------------------------+--------------+------+------------+ 
10 rows in set (0.03 sec)

Summarize

The above is the full content of this article. I hope that the content of this article will have certain reference learning value for your study or work. If you have any questions, you can leave a message to communicate. Thank you for your support for 123WORDPRESS.COM.

You may also be interested in:
  • How to smoothly go online after MySQL table partitioning
  • Apache, SSL, MySQL and PHP install smoothly and seamlessly
  • Detailed explanation of Mysql database smooth expansion to solve high concurrency and large data volume problems

<<:  VMware Workstation is not compatible with Device/Credential Guard

>>:  How to quickly set the file path alias in react

Recommend

MySQL conditional query and or usage and priority example analysis

This article uses examples to illustrate the usag...

About VUE's compilation scope and slot scope slot issues

What are slots? The slot directive is v-slot, whi...

Detailed steps to install CentOS7 system on VMWare virtual machine

Pre-installation work: Make sure vmware workstati...

How to use html2canvas to convert HTML code into images

Convert code to image using html2canvas is a very...

HTML head tag detailed introduction

There are many tags and elements in the HTML head ...

What to do if the container started by docker run hangs and loses data

Scenario Description In a certain system, the fun...

Centos builds chrony time synchronization server process diagram

My environment: 3 centos7.5 1804 master 192.168.1...

JavaScript to achieve a simple page countdown

This article example shares the specific code of ...

How to use indexes to optimize MySQL ORDER BY statements

Create table & create index create table tbl1...

CSS3 flexible box flex to achieve three-column layout

As the title says: The height is known, the width...

Specific use of Linux dirname command

01. Command Overview dirname - strip non-director...

The difference between method=post/get in Form

Form provides two ways of data transmission - get ...

Native JavaScript to implement random roll call table

This article example shares the specific code of ...

WeChat applet implements text scrolling

This article example shares the specific code for...

Implementing a simple web clock with JavaScript

Use JavaScript to implement a web page clock. The...