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

Detailed tutorial on installing MYSQL under WINDOWS

1. Download the installation package -Choose the ...

Tomcat's class loading mechanism process and source code analysis

Table of contents Preface 1. Tomcat class loader ...

How to underline the a tag and change the color before and after clicking

Copy code The code is as follows: a:link { font-s...

Common methods and problems of Docker cleaning

If you use docker for large-scale development but...

Review of the best web design works in 2012 [Part 1]

At the beginning of the new year, I would like to...

Double loading issue when the page contains img src

<br />When the page contains <img src=&qu...

A complete guide to some uncommon but useful CSS attribute operations

1. Custom text selection ::selection { background...

How to display TIF format images in browser

The browser displays TIF format images Copy code T...

JavaScript type detection method example tutorial

Preface JavaScript is one of the widely used lang...

Implementation example of scan code payment in vue project (with demo)

Table of contents Demand background Thought Analy...

What to do if you forget the initial password of MySQL on MAC

The solution to forgetting the initial password o...

VMware vSphere 6.7 (ESXI 6.7) graphic installation steps

Environment: VMware VCSA 6.7 (VMware-VCSA-all-6.7...