Book Image

MariaDB Cookbook

By : Daniel Bartholomew
Book Image

MariaDB Cookbook

By: Daniel Bartholomew

Overview of this book

Table of Contents (20 chapters)
MariaDB Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Migrating a table from MyISAM to Aria


MariaDB ships with the MyISAM and Aria storage engines, among many others. The main difference between these two is that Aria is crash safe, whereas MyISAM is not. Being crash safe means that an Aria table can recover from catastrophic power loss or other unexpected failures in a much better way than a MyISAM table can. If we use MyISAM tables, an easy upgrade is to convert them to Aria tables.

Getting ready

Import the ISFDB database as described in the Importing the data exported by mysqldump recipe in this chapter.

How to do it...

  1. Open the mysql command-line client and connect to the isfdb database.

  2. Run the following command line:

    ALTER TABLE authors ENGINE=Aria;
    
  3. The ALTER command will then change the table so that it uses the Aria storage engine.

  4. After it has finished, a message similar to the following will be displayed:

    Query OK, 110829 rows affected (3.14 sec)              
    Records: 110829  Duplicates: 0  Warnings: 0 
    
  5. If our system is older or is under...