Preface - MariaDB Cookbook (2014)

MariaDB Cookbook (2014)

Preface

MariaDB is a mature, stable, open source relational database. From its beginning in 2009 as a branch or fork of the MySQL database, to its status today as the default version of that database in most Linux distributions, and the database of choice for many companies large and small, MariaDB has proven that communities of users and developers, working and collaborating together, can do more than a single company could ever do.

MariaDB shares many features and capabilities of its parent database, but like most children it has also surpassed its parent in many ways. The recipes in this book tread some common ground, but they are mostly about the features that are unique to or were introduced first in MariaDB.

The why of certain features is there, to a small degree, but the main emphasis in each recipe is on the what and the how. The information you need to know to actually do something always trumps the theory behind it.

As part of the growing library of MariaDB-specific books from Packt Publishing and other publishers, the goal of this book is to give you a practical, hands-on experience with this powerful, feature-rich database.

What this book covers

Chapter 1, Getting Started with MariaDB, covers installing MariaDB on Linux, Windows, and Mac OS along with making backups, enabling common plugins, and other common tasks.

Chapter 2, Diving Deep into MariaDB, covers importing data, customizing the output of queries, migrating the data, and other topics.

Chapter 3, Optimizing and Tuning MariaDB, covers various configuration and optimization tasks as well as creating and removing indexes, JOINs, and other topics.

Chapter 4, The TokuDB Storage Engine, speaks about the alternative storage engine including how to enable it, and how to use and configure it.

Chapter 5, The CONNECT Storage Engine, explores the CONNECT storage engine including how to enable and configure it, and how to use it to connect to several different filetypes.

Chapter 6, Replication in MariaDB, includes recipes on global transaction IDs, multisource replication, and the binary log.

Chapter 7, Replication with MariaDB Galera Cluster, includes recipes that cover how to install and use this new clustering solution.

Chapter 8, Performance and Usage Statistics, covers using MariaDB's extended statistics, the audit plugin, and the performance schema.

Chapter 9, Searching Data Using Sphinx, covers how to install and use this useful full-text database indexer and search engine.

Chapter 10, Exploring Dynamic and Virtual Columns in MariaDB, is all about the built-in NoSQL features of MariaDB including dynamic and virtual columns features in MariaDB.

Chapter 11, NoSQL with HandlerSocket, is a chapter devoted to the NoSQL HandlerSocket feature and how to use it with various languages.

Chapter 12, NoSQL with the Cassandra Storage Engine, contains several recipes covering the installation and usage of the Cassandra storage engine.

Chapter 13, MariaDB Security, contains several recipes relating to securing MariaDB.

What you need for this book

To get the most out of this book, you'll need a computer that is capable of running MariaDB. Fortunately, this is quite easy as MariaDB runs well on many different versions of Windows, Mac OS, and Linux. Due to the limitations of some storage engines and other MariaDB components, there are some recipes which are Linux-only or Windows-only. These are marked as such in the text.

This book assumes that the reader is familiar with either the Windows, Mac OS, or Linux command-line environments; is comfortable with using a plain text editor; and knows how to download and install software. It is also helpful if the reader is familiar with databases and database concepts.

Who this book is for

This book is for anyone who wants to explore and learn how to use features that make MariaDB different from other databases in its class in a practical, hands-on way.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "Open our my.cnf or my.ini file in a text editor such as Vim, Emacs, TextWrangler, or Notepad."

A block of code is set as follows:

#

# * HandlerSocket

#

handlersocket_address="127.0.0.1"

handlersocket_port="9998"

handlersocket_port_wr="9999"

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

ANALYZE TABLE table_name PERSISTENT FOR

COLUMNS (column_1,column_2,...)

INDEXES (index_1,index_2,...);

Any command-line input or output is written as follows:

GRANT REPLICATION SLAVE, REPLICATION CLIENT ON *.*

TO replicant@'192.168.4.%'

IDENTIFIED BY 'sup3rs3kr37p455w0rd';

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "The Feedback plugin is turned off by default."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.