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 explanation of vuex persistence in practical application of vue

Table of contents vuex persistence Summarize vuex...

Detailed explanation of various join summaries of SQL

SQL Left Join, Right Join, Inner Join, and Natura...

Detailed explanation of Mencached cache configuration based on Nginx

Introduction Memcached is a distributed caching s...

Introduction to the use of MySQL official performance testing tool mysqlslap

Table of contents Introduction Instructions Actua...

A record of pitfalls in JS regular matching

I recently discovered a pitfall in regular expres...

js handles account logout when closing the browser

Table of contents Classic approach question Furth...

Detailed Analysis of Event Bubbling Mechanism in JavaScript

What is bubbling? There are three stages in DOM e...

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

The solution to forgetting the initial password o...

22 Vue optimization tips (project practical)

Table of contents Code Optimization Using key in ...

Summary of 4 ways to add users to groups in Linux

Preface Linux groups are organizational units use...

Vue implements mobile phone verification code login

This article shares the specific code of Vue to i...

Implementation of React configuration sub-routing

1. The component First.js has subcomponents: impo...

Analysis of parameter transfer process of driver module in Linux

Declare the parameter name, type and permission y...