SlideShare a Scribd company logo
The Complete MariaDB Server Tutorial
Colin Charles, Chief Evangelist, Percona Inc.

colin.charles@percona.com / byte@bytebot.net

http://www.bytebot.net/blog/ | @bytebot on Twitter

Percona Live Europe Amsterdam, Netherlands

3 October 2016
License
• Creative Commons BY-NC-SA 3.0
2
whoami
• Chief Evangelist (in the CTO office), Percona Inc
• Founding team of MariaDB Server (2009-2016),
previously at Monty Program Ab, merged with
SkySQL Ab, now MariaDB Corporation
• Formerly MySQL AB (exit: Sun Microsystems)
• Past lives include Fedora Project (FESCO),
OpenOffice.org
• MySQL Community Contributor of theYear Award
winner 2014
3
MariaDB is very social
• facebook: fb.com/MariaDB.dbms
• twitter: @MariaDB
• g+: plus.google.com/+mariadb/
• Tweet things you learn with #mariadb
4

Recommended for you

MariaDB Galera Cluster
MariaDB Galera ClusterMariaDB Galera Cluster
MariaDB Galera Cluster

This document discusses configuring and implementing a MariaDB Galera cluster for high availability on 3 Ubuntu servers. It provides steps to install MariaDB with Galera patches, configure the basic Galera settings, and start the cluster across the nodes. Key aspects covered include state transfers methods, Galera architecture, and important status variables for monitoring the cluster.

MariaDB 10.11 key features overview for DBAs
MariaDB 10.11 key features overview for DBAsMariaDB 10.11 key features overview for DBAs
MariaDB 10.11 key features overview for DBAs

Webinar: MariaDB 10.11 key features overview for DBAs Orgnised by Vettabase 27 April 2023 Amongst other topics: - Long ALTER TABLES now don’t cause replicas to lag - InnoDB configuration is now more dynamic, and certain important variables can be modified without a restart - Populating an empty table is now much faster - New data types: UUID, INET4, INET6 - SFORMAT() function, NATURAL_KEY_SORT() function

mariadbmariadb administrationmariadb features
The Full MySQL and MariaDB Parallel Replication Tutorial
The Full MySQL and MariaDB Parallel Replication TutorialThe Full MySQL and MariaDB Parallel Replication Tutorial
The Full MySQL and MariaDB Parallel Replication Tutorial

MariaDB 10.0 introduces domain-based parallel replication which allows transactions in different domains to execute concurrently on replicas. This can result in out-of-order transaction commit. MariaDB 10.1 adds optimistic parallel replication which maintains commit order. The document discusses various parallel replication techniques in MySQL and MariaDB including schema-based replication in MySQL 5.6 and logical clock replication in MySQL 5.7. It provides performance benchmarks of these techniques from Booking.com's database environments.

binlog serversbooking.commysql
Agenda
• This talk is about MariaDB Server from the
MariaDB Foundation
• There is no focus on MariaDB MaxScale or
MariaDB ColumnStore from the MariaDB
Corporation
5
Knowledgebase
6
Who are you?
• Database Administrator (DBA)
• Developer
• Database Architect (DA)
7
Database Experience
• MySQL
• 4.1 or earlier?
• 5.0
• 5.1
• 5.5
• 5.6
• MariaDB
• 5.1
• 5.2
• 5.3
• 5.5
• 10.0
8

Recommended for you

MySQL GTID Concepts, Implementation and troubleshooting
MySQL GTID Concepts, Implementation and troubleshooting MySQL GTID Concepts, Implementation and troubleshooting
MySQL GTID Concepts, Implementation and troubleshooting

This presentation was made by Mr. Santhinesh Kumar Nagendran at Mydbops Database Meetup -2 held at Bangalore on 26-01-2019.

mysqlhigh availabilityreplication
mysql 8.0 architecture and enhancement
mysql 8.0 architecture and enhancementmysql 8.0 architecture and enhancement
mysql 8.0 architecture and enhancement

Recording available here https://www.percona.com/resources/webinars/mysql-80-architecture-and-enhancement

mysqlmysql architecturemysql 8.0
MySQL Performance Schema in MySQL 8.0
MySQL Performance Schema in MySQL 8.0MySQL Performance Schema in MySQL 8.0
MySQL Performance Schema in MySQL 8.0

An overview of MySQL Performance Schema in 8.0 Few use cases to utilize Performance Schema. A glimpse of new features in MySQL 8.0 with examples

mysqlperformance schema
Understanding releases
• Alpha
• Beta
• Release Candidate
• Stable (GA)
• Labs
• Developer Milestone Releases (DMR)
9
What is MariaDB?
10
• Community developed
• Feature enhanced
• MariaDB doesn’t depend on MySQL for development -
many features are developed independently of MySQL
• Backwards compatible with MySQL
• (kind of) feature complete
• replication supported for easy migration
Aims of MariaDB
• Compatible, drop-in replacement to MySQL
• your application shouldn’t care that its
running MariaDB, easy upgrade (uninstall
mysql, install mariadb, continue ops!)
• Stable (bug-free) releases with no
regressions
• GPLv2
11
6 years, many server
releases
• MariaDB 5.1, GA February 2010
• MariaDB 5.2, GA November 2010
• MariaDB 5.3, GA February 2012
• MariaDB 5.5, GA April 2012
• MariaDB Galera Cluster, GA March 2013
• MariaDB 10.0.10 (March 2014)
• MariaDB 10.1.8 (October 2015)
12

Recommended for you

MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)
MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)
MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)

To get better replication speed and less lag, MySQL implements parallel replication in the same schema, also known as LOGICAL_CLOCK. But fully benefiting from this feature is not as simple as just enabling it. In this talk, I explain in detail how this feature works. I also cover how to optimize parallel replication and the improvements made in MySQL 8.0 and back-ported in 5.7 (Write Sets), greatly improving the potential for parallel execution on replicas (but needing RBR). Come to this talk to get all the details about MySQL 5.7 and 8.0 Parallel Replication.

mysqlmysql 5.7mysql 8.0
Open Source 101 2022 - MySQL Indexes and Histograms
Open Source 101 2022 - MySQL Indexes and HistogramsOpen Source 101 2022 - MySQL Indexes and Histograms
Open Source 101 2022 - MySQL Indexes and Histograms

Nobody complains that the database is too fast. But when things slow down, the complaints come quickly. The two most popular approaches to speeding up queries are indexes and histograms. But there are so many options and types on indexes that it can get confusing. Histograms are fairly new to MySQL but they do not work for all types of data. This talk covers how indexes and histograms work and show you how to test just how effective they are so you can measure the performance of your queries.

mysqlindexeshistograms
Galera cluster for high availability
Galera cluster for high availability Galera cluster for high availability
Galera cluster for high availability

Galera Cluster is high availabiity solution in MySQL. It benefits organizations that need synchronous and high availability solution.

databasegaleracluster
13
MariaDB 5.6?
• There will never be a MariaDB 5.6 - the
numbers have changed
• Many companies will still continue to
support both MySQL and MariaDB releases
14
MariaDB 10.0
15
The MariaDB
Ecosystem
16

Recommended for you

Query Optimization with MySQL 5.6: Old and New Tricks - Percona Live London 2013
Query Optimization with MySQL 5.6: Old and New Tricks - Percona Live London 2013Query Optimization with MySQL 5.6: Old and New Tricks - Percona Live London 2013
Query Optimization with MySQL 5.6: Old and New Tricks - Percona Live London 2013

Tutorial delivered at Percona MySQL Conference Live London 2013. It doesn't matter what new SSD technologies appear, or what are the latest breakthroughs in flushing algorithms: the number one cause for MySQL applications being slow is poor execution plan of SQL queries. While the latest GA version provided a huge amount of transparent optimizations -specially for JOINS and subqueries- it is still the developer's responsibility to take advantage of all new MySQL 5.6 features. In this tutorial we will propose the attendants a sample PHP application with bad response time. Through practical examples, we will suggest step-by-step strategies to improve its performance, including: * Checking MySQL & InnoDB configuration * Internal (performance_schema) and external tools for profiling (pt-query-digest) * New EXPLAIN tools * Simple and multiple column indexing * Covering index technique * Index condition pushdown * Batch key access * Subquery optimization

mysql5.6percona
An Overview to MySQL SYS Schema
An Overview to MySQL SYS Schema An Overview to MySQL SYS Schema
An Overview to MySQL SYS Schema

SYS Schema was now available in default from MySQL 5.7. This presentation provides an overview to it and real time purpose of those views.

mysql dbamonitoringmysql 5.7
MySQL Performance Schema in Action
MySQL Performance Schema in ActionMySQL Performance Schema in Action
MySQL Performance Schema in Action

Performance Schema is a powerful diagnostic instrument for: - Query performance - Complicated locking issues - Memory leaks - Resource usage - Problematic behavior, caused by inappropriate settings - More It comes with hundreds of options which allow precisely tuning what to instrument. More than 100 consumers store collected data. In this tutorial, we will try all the important instruments out. We will provide a test environment and a few typical problems which could be hardly solved without Performance Schema. You will not only learn how to collect and use this information but have experience with it. Tutorial at Percona Live Austin 2019

perconalivemysqlperformance
Importance of understanding
MariaDB (and MySQL)
• Generics are inefficient
• Since you have chosen MariaDB:
• maximise its strengths
• minimise its weaknesses
17
Sample databases to
play with
• http://dev.mysql.com/doc/index-other.html
• sakila sample database, world
database (used in MySQL training),
menagerie database (used in book:
Beginning MySQL), employees
database (large dataset, comes with data -
best to play with)
18
Picking hardware
• Just use 64-bit hardware
• VM’s are improving to use 64-bit OSes &
software
• Physical > virtual
• Disk: battery backed storage, plan for RAID
usage
• MariaDB 10.1 has optimisations for flash/SSD/
FusionIO
19
Testing MySQL
• Use MySQL Sandbox
• http://mysqlsandbox.net/
• Express one-click MySQL installs
• make_sandbox foo.tar.gz
• Does not require root privileges
20

Recommended for you

Dd and atomic ddl pl17 dublin
Dd and atomic ddl pl17 dublinDd and atomic ddl pl17 dublin
Dd and atomic ddl pl17 dublin

The document discusses atomic DDL operations in MySQL 8.0. It describes the requirements for a transactional data dictionary storage engine and storage engines that support atomic DDL. It provides examples of how DDL statements like CREATE TABLE, DROP TABLE, and DROP SCHEMA are implemented atomically in MySQL 8.0 using a single transaction, compared to previous versions where these operations were not fully atomic. This ensures consistency after DDL operations and prevents issues like orphan files or tables.

mysql 8.0mysqlatomic ddl
MySQL Parallel Replication: inventory, use-case and limitations
MySQL Parallel Replication: inventory, use-case and limitationsMySQL Parallel Replication: inventory, use-case and limitations
MySQL Parallel Replication: inventory, use-case and limitations

Booking.com uses MySQL parallel replication extensively with thousands of servers replicating. The presentation summarized MySQL and MariaDB parallel replication features including: 1) MySQL 5.6 uses schema-based parallel replication but transactions commit out of order. 2) MariaDB 10.0 introduced out-of-order parallel replication using write domains that can cause gaps. 3) MariaDB 10.1 includes five parallel modes including optimistic replication to reduce deadlocks during parallel execution. Long transactions and intermediate masters can limit parallelism.

mariadbmysqlbooking.com
How to Manage Scale-Out Environments with MariaDB MaxScale
How to Manage Scale-Out Environments with MariaDB MaxScaleHow to Manage Scale-Out Environments with MariaDB MaxScale
How to Manage Scale-Out Environments with MariaDB MaxScale

MaxScale is a database proxy that provides load balancing, connection pooling, and replication capabilities for MariaDB and MySQL databases. It can be used to scale databases horizontally across multiple servers for increased performance and availability. The document provides an overview of MaxScale concepts and capabilities such as routing, filtering, security features, and how it can be used for operational tasks like query caching, logging, and data streaming. It also includes instructions on setting up MaxScale with a basic example of configuring read/write splitting between a master and slave database servers.

mariadbmaxscaleopen source
Installation
• Binaries (tarballs) are available at http://mariadb.org/ (source too)
• Built, tested by MariaDB
• Graphical installer & configuration for Microsoft Windows, with
HeidiSQL GUI
• Up-to-date predictable release schedule
• RPM, DEB packages are provided, includingYUM & APT
repositories
• Use the repository configuration tool
• Inside Linux/*BSD distributions
• Easy to install, basic defaults, may be older than upstream
21
Upgrades
• Review changelogs carefully, even for minor
versions
• Make backups (using xtrabackup)
• Don’t forget to run mysql_upgrade
• by default with a distribution package
• Replication can reduce downtime by upgrading
the slave, promoting it, then upgrading the master
22
Upgrading from MySQL
5.0
• MariaDB 5.1 fixes upgrades better than MySQL 5.1
handles this
• InnoDB + Archive tables upgraded properly
• mysql_upgrade, mysqlcheck have more options to see
what’s going on
• mysqlcheck wrong warnings removed
• MySQL 5.1 -> MariaDB 5.1 is “drop-in”
• https://mariadb.com/kb/en/upgrading-to-mariadb-from-
mysql/
23
Packages (RPM
example)
• MariaDB-common
• character sets
• MariaDB-shared
• latest libmysqlclient, some plugins,
/etc/my.cnf.d/
• MariaDB-compat
• compatible client libraries that
replace mysql-libs
• MariaDB-server
• The actual server!
• MariaDB-client
• mysql client utilities
• MariaDB-test
• test suite
• MariaDB-devel
• development headers enabling
you to build your own package
• MariaDB-CassandraSE
• plugin for CassandraSE
24

Recommended for you

MariaDB Performance Tuning Crash Course
MariaDB Performance Tuning Crash CourseMariaDB Performance Tuning Crash Course
MariaDB Performance Tuning Crash Course

Krzysztof Ksiazek - Severalnines AB So, you are a developer or sysadmin and showed some abilities in dealing with databases issues. And now, you have been elected to the role of DBA. And as you start managing the databases, you wonder… * How do I tune them to make best use of the hardware? * How do I optimize the Operating System? * How do I best configure MySQL or MariaDB for a specific database workload? If you're asking yourself the following questions when it comes to optimally running your MySQL or MariaDB databases, then this talk is for you! We will discuss some of the settings that are most often tweaked and which can bring you significant improvement in the performance of your MySQL or MariaDB database. We will also cover some of the variables which are frequently modified even though they should not. Performance tuning is not easy, especially if you're not an experienced DBA, but you can go a surprisingly long way with a few basic guidelines.

mysqlmariadbdatabase
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11

Oracle's MySQL solutions make it easy to setup various database architectures and achieve high availability with the introduction MySQL InnoDB Cluster and MySQL InnoDB ReplicaSet meeting various high availability requirements. MySQL InnoDB ClusterSet provides a popular disaster recovery solution. Completely built in-house and supported by Oracle, many enterprises large and small have adopted these solutions into business critical applications. In this presentation the various database architecture solutions for high availability and disaster recovery will be covered and help you choose the right solutions based on your business requirements.

mysqlgroup replicationinnodb cluster
The MySQL Server Ecosystem in 2016
The MySQL Server Ecosystem in 2016The MySQL Server Ecosystem in 2016
The MySQL Server Ecosystem in 2016

This was a short 25 minute talk, but we go into a bit of a history of MySQL, how the branches and forks appeared, what's sticking around today (branch? Percona Server. Fork? MariaDB Server). What should you use? Think about what you need today and what the roadmap holds.

percona livemariadb serverpercona server
What is libmysqlclient?
• Client libraries
• Many applications are compiled against
libmysqlclient
• It is an Application Binary Interface (ABI)
• When you write in Java & use Connector/J,
Connector/J is compiled against libmysqlclient
• Similarly with PHP & Connector/PHP
25
MySQL utilities
• Why does MariaDB use all the same client utilities?
• Because the aim is to be a compatible drop-in
replacement
• There are very few non-MySQL utilities shipped:
aria_chk, aria_dump_log, aria_ftdump,
aria_pack, aria_read_log
• xtstat (PBXT) is deprecated in MariaDB 5.5
onwards
• mytop as it adds features not-present upstream
26
Finding help
• How do you know what CLI options to use?
• Use the man(ual) pages!
•man mysql
• man <command_name> usually works for
any CLI command
• HELP SELECT in mysql works too (help
tables) - HELP <operator>
27
Error messages
• perror is a great tool
• MariaDB-specific errors are 1900 and
above
• https://mariadb.com/kb/en/mariadb-error-
codes/#mariadb-specific-error-codes
28

Recommended for you

The Proxy Wars - MySQL Router, ProxySQL, MariaDB MaxScale
The Proxy Wars - MySQL Router, ProxySQL, MariaDB MaxScaleThe Proxy Wars - MySQL Router, ProxySQL, MariaDB MaxScale
The Proxy Wars - MySQL Router, ProxySQL, MariaDB MaxScale

This document discusses MySQL proxy technologies including MySQL Router, ProxySQL, and MariaDB MaxScale. It provides an overview of each technology, including when they were released, key features, and comparisons between them. ProxySQL is highlighted as a popular option currently with integration with Percona tools, while MySQL Router may become more widely used due to its support for MySQL InnoDB Cluster. MariaDB MaxScale is noted for its binlog routing capabilities. Overall the document aims to help people understand and choose between the different MySQL proxy options.

fosdemfosdem2017proxy
Lessons from {distributed,remote,virtual} communities and companies
Lessons from {distributed,remote,virtual} communities and companiesLessons from {distributed,remote,virtual} communities and companies
Lessons from {distributed,remote,virtual} communities and companies

A last minute talk for the people at DevOps Amsterdam, happening around the same time as O'Reilly Velocity Amsterdam 2016. Here are lessons one can learn from distributed/remote/virtual communities and companies from someone that has spent a long time being remote and distributed.

distributedvirtualcommunity
Securing your MySQL / MariaDB Server data
Securing your MySQL / MariaDB Server dataSecuring your MySQL / MariaDB Server data
Securing your MySQL / MariaDB Server data

Co-presented alongside Ronald Bradford, this covers MySQL, Percona Server, and MariaDB Server (since the latter occasionally can be different enough). Go thru insecure practices, focus on communication security, connection security, data security, user accounts and server access security.

auditsecuritymariadb server
mysql_secure_insta
llation
• Now that you’ve tested MySQL works fine (by
default, no root password), it’s time to ensure you
secure the installation
• Set root password
• Remove anonymous users
• Disallow remote root login
• Remove test database
• Reload privileges
29
mysqladmin
• Manage user accounts, passwords,
permissions
• Display mysqld settings & status counters
• Shutdown, create, drop databases
shell> mysqladmin processlist
shell> mysqladmin extended-status
shell> mysqladmin -uroot -p create wordpress
30
SHOW PROCESSLIST
SHOW STATUS
mysqldump
• Dump schema and/or data to .sql file, tab
• Useful for backups, transferring data
• Locks for consistency, so troublesome
shell> mysqldump --all-databases > backup.sql
shell> mysqldump --all-databases --single-transaction >
backup.sql
31
Other tools
• There are many other command line
tools...
• Front-ends
• HeidiSQL
• Webyog’s SQLyog
• Sequel Pro (OSX)
32

Recommended for you

Best practices for MySQL/MariaDB Server/Percona Server High Availability
Best practices for MySQL/MariaDB Server/Percona Server High AvailabilityBest practices for MySQL/MariaDB Server/Percona Server High Availability
Best practices for MySQL/MariaDB Server/Percona Server High Availability

Best practices for MySQL/MariaDB Server/Percona Server High Availability - presented at Percona Live Amsterdam 2016. The focus is on picking the right High Availability solution, discussing replication, handling failure (yes, you can achieve a quick automatic failover), proxies (there are plenty), HA in the cloud/geographical redundancy, sharding solutions, how newer versions of MySQL help you, and what to watch for next.

high availabilityfailoverplams16
Forking Successfully - or is a branch better?
Forking Successfully - or is a branch better?Forking Successfully - or is a branch better?
Forking Successfully - or is a branch better?

Forking Successfully or do you think a branch will work better? Learn from history, see what's current, etc. Presented at OSCON London 2016. This is forking beyond the github generation. And if you're going to do it, some tips on how you could be successful.

mariadbgnu emacsxemacs
Lessons from database failures
Lessons from database failuresLessons from database failures
Lessons from database failures

Presented at the MySQL Chicago Meetup in August 2016. The focus of the talk is on backups and verification, replication and failover, as well as security and encryption.

mysqlpercona serverreplication
MariaDB Architecture
33
Making client
connections
• TCP/IP is available on all platforms
• disable using --skip-networking
• Socket files available on Unix
• fastest communication path
• MySQL connections are generally cheap
• If you have many short running queries (typical web
app), you benefit from MariaDB threadpool
• Set connection limit max_connections=n in my.cnf
34
Connection Pool
• mysqld’s main thread listens for connections
• Each connection has a thread assigned to it
• Threads can be:
• created newly
• reused from thread cache
• User authentication processed based on hostname,
username & password
• Client specific buffers for session variables are allocated
35
How a query is
processed
36

Recommended for you

MariaDB Server Compatibility with MySQL
MariaDB Server Compatibility with MySQLMariaDB Server Compatibility with MySQL
MariaDB Server Compatibility with MySQL

At the MariaDB Server Developer's meeting in Amsterdam, Oct 8 2016. This was the deck to talk about what MariaDB Server 10.1/10.2 might be missing from MySQL versions up to 5.7. The focus is on compatibility of MariaDB Server with MySQL.

mysqlmariadb servermariadb
Lessons from database failures
Lessons from database failures Lessons from database failures
Lessons from database failures

Failure happens, and we can learn from it. We need to think about backups, but also verification of them. We should definitely make use of replication and think about automatic failover. And security is key, but don't forget that encryption is now available in MySQL, Percona Server and MariaDB Server.

mysqlplams16database
MariaDB 10.1 what's new and what's coming in 10.2 - Tokyo MariaDB Meetup
MariaDB 10.1   what's new and what's coming in 10.2 - Tokyo MariaDB MeetupMariaDB 10.1   what's new and what's coming in 10.2 - Tokyo MariaDB Meetup
MariaDB 10.1 what's new and what's coming in 10.2 - Tokyo MariaDB Meetup

Presented at the Tokyo MariaDB Server meetup in July 2016, this is an overview of what you can see and use in MariaDB Server 10.1, but more importantly what is planned to arrive in 10.2

mariadb servermysqlmariadb
Query Cache
• Stores SELECT queries and their result sets
• Subquery cache exists only in MariaDB
• Frequently changed table data will cause
queries to naturally be missed
• Regularly replaced these days with
memcached, et al.
37
SQL Parser
• Lexical scanner & grammar rules
• Parse SQL into tokens
• Apply grammar rules to check statement
validity
• Construct a parse tree for Optimizer to
use
38
Optimizer
• Reads the parse tree and calculates the best query
execution plan (QEP) to handle query
• find indexes
• determine JOIN order
• eliminate unnecessary tables
• etc.
• The optimizer is smart, don’t try to force query
plans
39
Pluggable Storage
Engines
• MariaDB can use many storage engines
with different features
• Installed/removed on fly with INSTALL/
UNINSTALL PLUGIN
• Mixing & matching on same server, even on
same query
40

Recommended for you

MariaDB - the "new" MySQL is 5 years old and everywhere (LinuxCon Europe 2015)
MariaDB - the "new" MySQL is 5 years old and everywhere (LinuxCon Europe 2015)MariaDB - the "new" MySQL is 5 years old and everywhere (LinuxCon Europe 2015)
MariaDB - the "new" MySQL is 5 years old and everywhere (LinuxCon Europe 2015)

MariaDB is like the "new" MySQL, and its available everywhere. This talk was given at LinuxCon Europe in Dublin in October 2015. Learn about all the new features, considering the release was just around the corner. Changes in replication are also very interesting

mysqlmariadb
Lessons from database failures
Lessons from database failuresLessons from database failures
Lessons from database failures

This is my third iteration of the talk presented in Tokyo, Japan - first was at a keynote at rootconf.in in April 2016, then at the MySQL meetup in New York, and now for dbtechshowcase. The focus is on database failures of the past, and how modern MySQL / MariaDB Server technologies could have helped them avoid such failure. The focus is on backups and verification, replication and failover, and security and encryption.

mysqlsecurityencrypytion
Hexatier - MySQL Role-based Security & Data Masking
Hexatier - MySQL Role-based Security & Data MaskingHexatier - MySQL Role-based Security & Data Masking
Hexatier - MySQL Role-based Security & Data Masking

Presentation given at New York MySQL Meetup, Sept 8 2016. Covers how we use Hexatier at Teladoc to provide role-based security and to mask PHI in the database.

mysql security roles masking
Value proposition
• Unmatched flexibility + customisation potential
• MEMORY engine for performance/routine
lookup data
• Right storage engine can improve performance
in many applications
• ARCHIVE compresses data, up to 80%
• Partners & community benefit from this
41
What makes engines
different?
• Storage: how the data is stored on disk
• Or in NDB (memory+disk), CassandraSE (access a Cassandra Cluster), SphinxSE
(access the Sphinx daemon)
• Indexes: improves search operations
• Memory usage: improves data access for speed
• Transactions: protects the integrity of your data (Atomic-Consistent-Isolated-
Durable - ACID)
• Locking level: MyISAM (table locks), InnoDB (row locks), old BDB (page locks)
• Data types: Data types may be converted, MEMORY doesn’t support TEXT, etc.
• Caching: InnoDB caches data & indexes, MyISAM caches indexes only (relying on OS
disk cache for data)
• Full-text search capability: MyISAM has this, InnoDB 5.6 got this
• GIS: MyISAM & Aria work (R-tree indexes exist), InnoDB 5.7 has this too
42
INFORMATION_SCHE
MA
• Holds metadata (data about the data) on all
other databases & tables, exposed as
regular tables
• Generated on the fly
• Has extensions in MariaDB as we expose
more data than native MySQL
43
PERFORMANCE_SCH
EMA
• Allows for monitoring execution at a low
level
• This is a storage engine, monitoring server
events (anything that takes time & can be
instrumented)
• Tables are views or temporary tables that
use no on-disk storage
44

Recommended for you

cPanelCon 2014: InnoDB Anatomy
cPanelCon 2014: InnoDB AnatomycPanelCon 2014: InnoDB Anatomy
cPanelCon 2014: InnoDB Anatomy

The document provides an overview of the InnoDB storage engine architecture in MySQL. It describes how InnoDB implements the ACID properties through atomic transactions that can either fully commit or roll back. It also explains the physical storage structure, including the system tablespace stored in the ibdata file, tablespace files, and redo log files. The document details the internal page, index, and transaction log structures used to store and access data on disk.

innodbmysqlcpanel conference 2014
A beginners guide to MariaDB
A beginners guide to MariaDBA beginners guide to MariaDB
A beginners guide to MariaDB

MariaDB started life as a database to host the Maria storage engine in 2009. Not long after its inception, the MySQL community went through yet another change in ownership, and it was deemed that MariaDB will be a complete database branch developed to extend MySQL, but with constant merging of upstream changes. The goal of the MariaDB project is to ensure that everyone is part of the community, including employees of the major steering companies. MariaDB also features enhanced features, some of which are common with the Percona Performance Server. Most importantly, MariaDB is a drop-in replacement and is completely backward compatible with MySQL. In 2010, MariaDB released 5.1 in February, and 5.2 in November – two major releases in a span of one calendar year is a feat that was achieved! DBAs and developers alike will gain an introduction to MariaDB, what is different with MySQL, how to make use of the feature enhancements, and more.

mariadbmysql
Meet MariaDB Server 10.1 London MySQL meetup December 2015
Meet MariaDB Server 10.1 London MySQL meetup December 2015Meet MariaDB Server 10.1 London MySQL meetup December 2015
Meet MariaDB Server 10.1 London MySQL meetup December 2015

Meet MariaDB Server 10.1, the server that got released recently. Presented at the London MySQL Meetup in December 2015. Learn about the new features in MariaDB Server, especially around the focus of what we did to improve security.

databasesecuritymariadb
Transactional vs. non-
transactional
• Transaction-safe tables
(InnoDB) have advantages
over non-transaction safe
tables (MyISAM):
• server crash? Automatic
recovery, or a backup
+transaction log
• ROLLBACK can be
executed to ignore
changes
• Update fails? Changes
reverted
• Concurrency - tables w/
many update +
concurrent reads
• Disadvantages in today’s
environments (transaction
overhead = slower), more
disk space requirements,
more memory to perform
updates don’t seem like they
apply any longer
45
Indexes
• Tree Indexes
• B-Trees
• B+Trees (InnoDB)
• T-Trees (NDB)
• Red-black binary trees
(MEMORY)
• R-Trees (MyISAM for spatial
indexes)
• Hash Indexes (MEMORY, NDB,
InnoDB)
• If table fits entirely in
memory, fastest way to
perform queries is a hash
index
• InnoDB has an internal
adaptive hash index. InnoDB
monitors index searches,
and if it notices that it will
benefit from a hash index,
InnoDB automatically builds
one. (5.1.24 and greater)
46
MyISAM
• Pros?
• excellent INSERT
performance
• small footprint
• supports full-text
search (FTS)
• Cons?
• no transactions
• no foreign key
support
• Typical uses
• logging
• auditing
• data warehousing
47
MyISAM II
• In my.cnf, remember to
set the key_buffer_size.
This is memory*0.40, as
MyISAM uses the OS
cache for tables
• myisam_use_mmap
enables MyISAM to use
memory mapping
(7-40% speed
improvement)
• key_cache_segments =
1 enables segmented key
caches in MariaDB -
~250% improvements, as
it mitigates thread
contention for key cache
lock
48

Recommended for you

Meet MariaDB 10.1 at the Bulgaria Web Summit
Meet MariaDB 10.1 at the Bulgaria Web SummitMeet MariaDB 10.1 at the Bulgaria Web Summit
Meet MariaDB 10.1 at the Bulgaria Web Summit

Meet MariaDB 10.1 at the Bulgaria Web Summit, held in Sofia in February 2016. Learn all about MariaDB Server, and the new features like encryption, audit plugins, and more.

mariadb servermysqlmariadb
My first moments with MongoDB
My first moments with MongoDBMy first moments with MongoDB
My first moments with MongoDB

An introduction to MongoDB from an experienced MySQL user and developer. There are differences and we go thru the What/Why/Who/Where of MongoDB, the "similarities" to the MySQL world like storage engines, how replication is a little more interesting with built-in sharding and automatic failover, backups, monitoring, DBaaS, going to production and finding out more resources.

nosqlmongodbdatabase
MariaDB Server & MySQL Security Essentials 2016
MariaDB Server & MySQL Security Essentials 2016MariaDB Server & MySQL Security Essentials 2016
MariaDB Server & MySQL Security Essentials 2016

This document summarizes a presentation on MariaDB/MySQL security essentials. The presentation covered historically insecure default configurations, privilege escalation vulnerabilities, access control best practices like limiting privileges to only what users need and removing unnecessary accounts. It also discussed authentication methods like SSL, PAM, Kerberos and audit plugins. Encryption at the table, tablespace and binary log level was explained as well. Preventing SQL injections and available security assessment tools were also mentioned.

securitymysqlmariadb
MyISAM segmented key
caches
• Mitigates thread contention for key cache lock, with
notable performance improvements
• Key caches divided into different segments, allowing
for better key cache concurrency
• 1-64 segments
49
InnoDB
• Maintains its own buffer pool (does
aggressive memory caching)
• Uses tablespaces (several files on disk, raw
disk support)
• Typically used for OLTP operations
50
ARCHIVE
• Store large amounts of data without
indexes, in small disk footprint
• SELECT and INSERT operations only
• Good for data audit use
• Uses AZIO (zlib) compression
51
FederatedX
• Create logical pointers to tables that exist on other MySQL servers;
these can then be linked together to form one logical database
• A federated table pointing to an InnoDB table on another server, will
have transaction support (in 5.1)
• Capabilities limited to underlying engine on remote server
• CREATE TABLE t1 (...) ENGINE=FEDERATED
CONNECTION='mysql://username:pwd@myhost:3306/db_name/
tbl_name
• Can also be used for synchronous replication
• Federated table on master server pointing to slave; triggers on
master table to write all changes to remote table once applied to
the master
52

Recommended for you

MySQL Server Backup, Restoration, And Disaster Recovery Planning Presentation
MySQL Server Backup, Restoration, And Disaster Recovery Planning PresentationMySQL Server Backup, Restoration, And Disaster Recovery Planning Presentation
MySQL Server Backup, Restoration, And Disaster Recovery Planning Presentation

This document discusses MySQL server backup, restoration, and disaster recovery planning. It covers when backups are needed, what to back up, best practices for performing backups, storage locations, and backup tools and methods. Key points include backing up databases, logs, and configurations regularly using tools like mysqldump, the binary log, and file copying with FLUSH TABLES WITH READ LOCK. Restoring requires both backups and binary logs to recover to a point-in-time.

mysqlrecoverydisaster
The Complete MariaDB Server Tutorial - Percona Live 2015
The Complete MariaDB Server Tutorial - Percona Live 2015The Complete MariaDB Server Tutorial - Percona Live 2015
The Complete MariaDB Server Tutorial - Percona Live 2015

The document provides an overview of the Complete MariaDB Server Tutorial presentation. It introduces MariaDB and discusses what it is, its goals of being compatible with MySQL and having stable releases. It also covers MariaDB architecture, installation, utilities, and storage engines.

mariadbmysql
Mariadb10 和新项目中有什么
Mariadb10 和新项目中有什么Mariadb10 和新项目中有什么
Mariadb10 和新项目中有什么

This document summarizes MariaDB 10.0 and what's new in the project. It provides an overview of MariaDB's history and goals of being compatible with MySQL. Key features of MariaDB 10.0 include backported features from MySQL 5.6, new features like multi-source replication, and engines for Cassandra and LevelDB. The roadmap is to have parity with MySQL 5.6 by MariaDB 10.1 while continuing to enhance and expand the feature set. Community involvement and the new MariaDB Foundation are discussed.

Memory
• Previously known as HEAP tables
• In-memory engine
• Hash index used by default (changes in 5.2,
enable much better INSERT performance),
B-Tree available too
• https://mariadb.com/kb/en/performance-of-
memory-tables/
53
Aria
• Based off the 5.1 code
• 1.0 – crash-safe MyISAM, with cacheable row format
• 1.5 – concurrent INSERT/SELECT
• Soon to be merged into 6.0, then...
• 2.0: transactional + ACID compliance
• 3.0: high concurrency, online backup
• Goal:ACID compliant, MVCC transactional storage engine, based on MyISAM
• Target? Data warehousing
• Uses big log files (1GB by default)
• 8K pages used by default (MyISAM uses 1K pages)
• Has group commit (MariaDB 5.2) to speed up inserts
54
PBXT (deprecated)
• MVCC, transactional,ACID compliant, foreign key
support
• row-level locking for updates, so maximum concurrency
• immediate notification if client processes are
deadlocked
• write-once, as it uses a log-based architecture (write
data to DB without first writing to transaction log)
• support for BLOB streaming with Blob Streaming
engine
55
Storage Engine API
• http://dev.mysql.com/tech-resources/
articles/creating-new-storage-engine.html
• SHOW PLUGINS;
• https://kb.askmonty.org/v/extending-create-
table
• storage/example/ha_example.cc and
storage/example/ha_example.h
56

Recommended for you

MariaDB 10 and what's new with the project
MariaDB 10 and what's new with the projectMariaDB 10 and what's new with the project
MariaDB 10 and what's new with the project

This document provides an overview of MariaDB 10.0 and what's new compared to previous versions. Some of the key highlights include backporting features from MySQL 5.6 such as InnoDB, Performance Schema, and online ALTER TABLE. MariaDB 10.0 also includes new features like multi-source replication, persistent statistics, and integration with NoSQL databases. The goals are to have feature parity with MySQL 5.6 and provide an open source alternative to Oracle's MySQL with more active development.

mysqlmariadb
Maria db 10 and the mariadb foundation(colin)
Maria db 10 and the mariadb foundation(colin)Maria db 10 and the mariadb foundation(colin)
Maria db 10 and the mariadb foundation(colin)

This document provides an overview of MariaDB 10 and the MariaDB Foundation. It discusses the history and development of MariaDB, including key features added in versions 5.1 through 10.0 such as new storage engines, performance improvements, and features backported from MySQL. It outlines the goals of MariaDB to be compatible with MySQL while adding new features, and describes the community-led development model. The roadmap aims to have MariaDB be a drop-in replacement for MySQL 5.6 by releasing version 10.1.

The MySQL Server ecosystem in 2016
The MySQL Server ecosystem in 2016The MySQL Server ecosystem in 2016
The MySQL Server ecosystem in 2016

MySQL is a unique adult (now 21 years old) in many ways. It supports plugins. It supports storage engines. It is also owned by Oracle, thus birthing two branches of the popular opensource database: Percona Server and MariaDB Server. It also once spawned a fork: Drizzle. Lately a consortium of web scale users (think a chunk of the top 10 sites out there) have spawned WebScaleSQL. You're a busy DBA having to maintain a mix of this. Or you're a CIO planning to choose one branch. How do you go about picking? Supporting multiple databases? Find out more in this talk. Also covered is a deep-dive into what feature differences exist between MySQL/Percona Server/MariaDB/WebScaleSQL, how distributions package the various databases differently. Within the hour, you'll be informed about the past, the present, and hopefully be knowledgeable enough to know what to pick in the future. Note, there will also be coverage of the various trees around WebScaleSQL, like the Facebook tree, the Alibaba tree as well as the Twitter tree.

ecosystemscale14xscale
Writing your own
• Find the plugin path - show variables like “%plugin%”;
+-----------------+-----------------------------------------------+
| Variable_name | Value |
+-----------------+-----------------------------------------------+
| plugin_dir | /usr/local/Cellar/mariadb/10.0.15/lib/plugin/ |
| plugin_maturity | unknown |
+-----------------+-----------------------------------------------+
• note that this is also where you store UDFs
• Copy the relevant engine (eg. myengine.so)
• INSTALL PLUGIN myengine SONAME 'myengine.so';
• Server registers plugin to mysql.plugin table, and now ENGINE=myengine will work
57
Things to think about
• Backup is not engine-independent
• MyISAM, InnoDB,TokuDB
• LVM/ZFS snapshots mitigate this
• Different engines have different monitoring
options
• Mix and match; use summary tables
58
Survey of popular OSS
tools - what they use
• Wordpress (blog): uses default engine, MyISAM is fine
• MediaWiki (wiki): prefers InnoDB, except for
“searchindex” table, which is MyISAM
• http://svn.wikimedia.org/viewvc/mediawiki/trunk/
phase3/maintenance/tables.sql?view=markup
• vBulletin (forum): MyISAM
• SugarCRM (CRM): MyISAM (with conversion script to
InnoDB provided)
• Zimbra Collaboration Suite: InnoDB
59
Now, let’s focus on
MariaDB features
60

Recommended for you

The MySQL Server ecosystem in 2016
The MySQL Server ecosystem in 2016The MySQL Server ecosystem in 2016
The MySQL Server ecosystem in 2016

The document summarizes the history and current state of the MySQL database server ecosystem. It discusses the origins and development of MySQL, MariaDB, Percona Server, and other related projects. It also describes some of the key features and innovations in recent versions of these database servers. The ecosystem is very active with contributions from many organizations and the future remains promising with ongoing work.

MariaDB - Fast, Easy & Strong - Get Started Tutorial
MariaDB - Fast, Easy & Strong - Get Started TutorialMariaDB - Fast, Easy & Strong - Get Started Tutorial
MariaDB - Fast, Easy & Strong - Get Started Tutorial

MariaDB - Fast, Easy & Strong - Get Started Guide. You can understand why you should use MariaDB and how easy to install it for your server. Let 's enjoy!!!

websiteperformancemariadb
MariaDB: The 2012 Edition
MariaDB: The 2012 EditionMariaDB: The 2012 Edition
MariaDB: The 2012 Edition

MariaDB is a community developed branch of MySQL that is feature enhanced and backward compatible. It aims to be a 100% drop-in replacement for MySQL that is stable, bug-free, and released under the GPLv2 license. Major releases of MariaDB include new storage engines like XtraDB and Aria, as well as new features for performance, scalability, and compatibility. MariaDB is developed as an open source project and supported by Monty Program and other community contributors and service providers.

mysqlpercona livemariadb
We start with...
• What came in 5.1, 5.2, 5.3, 5.5 (jump
around appropriately)
• What comes in 10.0 series
• I won’t talk about deprecated features like
PBXT in-depth, or even the old MariaDB
5.1 pool of threads (5.5 threadpool is
better + improvements in 10.1)
61
XtraDB
• A more performant
InnoDB designed to
scale on modern
hardware
• Less checkpointing
(smoother), less flushing
to disk
62
InnoDB notes
• SHOW GLOBALVARIABLES LIKE ‘innodb_ver
%';
• Important - ship XtraDB and merge with
different Percona Server versions
• eg. innodb_adaptive_flushing_method - native|
estimate|keep_average - where was reflex?
• (okay, 5.6 compatibility,
innodb_adaptive_flushing eventually)
63
InnoDB Fake Changes
• InnoDB Fake Changes for replication pre-
fetching (for DML operations)
• Great for buffer pool warmup
• Consider using multi-threaded slaves in 10.2
• https://www.percona.com/doc/percona-
server/5.6/management/
innodb_fake_changes.html
64

Recommended for you

The MySQL ecosystem - understanding it, not running away from it!
The MySQL ecosystem - understanding it, not running away from it! The MySQL ecosystem - understanding it, not running away from it!
The MySQL ecosystem - understanding it, not running away from it!

You're a busy DBA thinking about having to maintain a mix of this. Or you're a CIO planning to choose one branch over another. How do you go about picking? Supporting multiple databases? Find out more in this talk. Also covered is a deep-dive into what feature differences exist between MySQL/Percona Server/MariaDB Server. Within 20 minutes, you'll leave informed and knowledgable on what to pick. A base blog post to get started: https://www.percona.com/blog/2017/11/02/mysql-vs-mariadb-reality-check/

mysqlmariadbmariadb server
MariaDB 初学者指南
MariaDB 初学者指南MariaDB 初学者指南
MariaDB 初学者指南

MariaDB is a community developed fork of MySQL that is feature enhanced and backward compatible. It aims to be a 100% drop-in replacement for MySQL. Recent versions have included storage engines like Percona XtraDB and PrimeBase PBXT, as well as new features like pluggable authentication, virtual columns, and an improved query optimizer. The project is open source and community developed by the MariaDB Foundation and its partners. Future plans include a focus on InnoDB and replication improvements.

Why MariaDB?
Why MariaDB?Why MariaDB?
Why MariaDB?

The myriad reasons why you want to use MariaDB over stock MySQL. Current up to MariaDB 5.3, and presented at Percona Live London 2011.

percona livemariadbpercona live london
Log archiving
• Log archiving (use to create incremental
backups with xtrabackup)
• When log archiving is enabled, it duplicates
all redo log writes in a separate set of files
in addition to normal redo log writing,
creating new files as necessary.
• https://www.percona.com/doc/percona-
server/5.6/management/log_archiving.html
65
SHOW ENGINE
INNODB STATUS
• Extended, reorganised
• Information about internal hash tables
Internal hash tables (constant factor + variable
factor)
Adaptive hash index 2446944 (2213368 + 233576)
Page hash 139112 (buffer pool 0 only)
Dictionary cache 788235 (554768 + 233467)
File system 829168 (812272 + 16896)
Lock system 333592 (332872 + 720)
Recovery system 0 (0 + 0)
66
Count InnoDB
deadlocks
• Show deadlocks since the server has
started
• SHOW GLOBAL STATUS LIKE
‘innodb_deadlocks';
• + SHOW ENGINE INNODB MUTEX;
67
Further reading
• Multiple Adaptive Hash Search Partitions
• https://www.percona.com/doc/percona-
server/5.6/scalability/
innodb_adaptive_hash_index_partitions.ht
ml
• Improved InnoDB I/O Scalability
• https://www.percona.com/doc/percona-
server/5.6/scalability/innodb_io.html
68

Recommended for you

Databases in the hosted cloud
Databases in the hosted cloudDatabases in the hosted cloud
Databases in the hosted cloud

Today you can use hosted MySQL/MariaDB/Percona Server in several "cloud providers" in what is considered using it as a service, a database as a service (DBaaS). You can also use hosted PostgreSQL and MongoDB thru various service providers. Learn the differences, the access methods, and the level of control you have for the various public cloud offerings: - Amazon RDS for MySQL and PostgreSQL - Google Cloud SQL - Rackspace OpenStack DBaaS - The likes of compose.io, MongoLab and Rackspace's offerings around MongoDB The administration tools and ideologies behind it are completely different, and you are in a "locked-down" environment. Some considerations include: * Different backup strategies * Planning for multiple data centres for availability * Where do you host your application? * How do you get the most performance out of the solution? * What does this all cost? Growth topics include: * How do you move from one DBaaS to another? * How do you move all this from DBaaS to your own hosted platform? Questions like this will be demystified in the talk. This talk will benefit experienced database administrators (DBAs) who now also have to deal with cloud deployments as well as application developers in startups that have to rely on "managed services" without the ability of a DBA.

google cloud sqlcloud computingdatabase
MariaDB 10: A MySQL Replacement - HKOSC
MariaDB 10: A MySQL Replacement - HKOSC MariaDB 10: A MySQL Replacement - HKOSC
MariaDB 10: A MySQL Replacement - HKOSC

MariaDB 10: A MySQL Replacement. Current up to 10.0.9, right before the 10.0.10 GA release presented the weekend before the release in Hong Kong, at the Hong Kong Open Source Conference.

mysqlhkoscmariadb
Differences between MariaDB 10.3 & MySQL 8.0
Differences between MariaDB 10.3 & MySQL 8.0Differences between MariaDB 10.3 & MySQL 8.0
Differences between MariaDB 10.3 & MySQL 8.0

MySQL and MariaDB are becoming more divergent. Learn what is different from a high level. It is also a good idea to ensure that you use the correct database for the correct job.

mysqlmariadbmariadb server
Switching between
XtraDB & InnoDB
mysqld --ignore-builtin-innodb --plugin-
load=innodb=ha_innodb.so --plugin_dir=/usr/local/
mysql/lib/mysql/plugin
Or in my.cnf
[mysqld]
ignore-builtin-innodb
plugin-load=innodb=ha_innodb.so
plugin_dir=/usr/local/mysql/lib/mysql/plugin
69
Usernames
• Usernames in MariaDB > 5.5.31? 80 character limit (which
you have to reload manually)
create user
'long12345678901234567890'@'localhost'
identified by 'pass';
Query OK, 0 rows affected (0.01 sec)
vs
ERROR 1470 (HY000): String
'long12345678901234567890' is too long for
user name (should be no longer than 16)
70
MariaDB 5.5: an
opensource threadpool
• Modified from 5.1 (libevent
based), great for CPU
bound loads and short
running queries
• No minimization of
concurrent transactions
with dynamic pool size
• thread_handling=po
ol-of-threads
• https://mariadb.com/kb/en/
mariadb/thread-pool-in-
mariadb/
71
Improved threadpool
• You can limit resources used by threads:
thread_pool_max_threads
• SHOW GLOBALVARIABLES LIKE
'%thread_%';
72

Recommended for you

MariaDB - a MySQL Replacement #SELF2014
MariaDB - a MySQL Replacement #SELF2014MariaDB - a MySQL Replacement #SELF2014
MariaDB - a MySQL Replacement #SELF2014

MariaDB - a MySQL replacement at South East Linux Fest 2014 - SELF2014. Learn about features that are not in MySQL 5.6, some that are only just coming in MySQL 5.7, and some that just don't exist.

self2014mariadbmysql
Introduction of MariaDB 2017 09
Introduction of MariaDB 2017 09Introduction of MariaDB 2017 09
Introduction of MariaDB 2017 09

MariaDB is an open-source relational database management system that was created to be more open and community-focused than its predecessor, MySQL. It was founded in 2009 by the original developers of MySQL after Oracle acquired Sun Microsystems. MariaDB aims to preserve the open nature of MySQL by using an open governance model and keeping its code open source under GPL. It has become the default database in several major Linux distributions and is available on major cloud platforms. MariaDB provides an enterprise-grade database with high availability, performance, scalability and security features.

mariadbsql
Open11 maria db the new m in lamp
Open11 maria db the new m in lampOpen11 maria db the new m in lamp
Open11 maria db the new m in lamp

- MariaDB is a community-developed fork of MySQL that is fully compatible and intended as a drop-in replacement. It aims to be stable, high-performance, and feature-enhanced compared to MySQL. - Major new features in MariaDB 5.1 include storage engines like XtraDB and PBXT, extended slow query log statistics, and bug fixes. MariaDB 5.2 includes virtual columns, pluggable authentication, and optimizations. - The MariaDB community is open source and welcomes contributions beyond just coding, such as writing documentation, testing, and evangelism.

mysqlmariadb
Better for DBAs: async
client library
• start operation, do work
in thread, operation
processed, result travels
back
• use cases: multiple
queries against single
server (utilize more
CPUs); queries against
multiple servers
(SHOW STATUS on
many machines)
• https://
kb.askmonty.org/en/
about-non-blocking-
operation-in-the-
client-library/
• fast node.js driver
available: mariasql
• https://
kb.askmonty.org/en/
mariasql-for-nodejs/
73
LIMIT ROWS
EXAMINED
• The purpose of this
optimization is to
provide the means to
terminate the execution
of SELECT statements
which examine too
many rows, and thus use
too many resources.
•SELECT * from
t1, t2 LIMIT 10
ROWS EXAMINED
1000;
• https://kb.askmonty.org/
en/limit-rows-examined/
74
SHOW STATUS
• SHOW STATUS provides server status
information. It is like mysqladmin extended-status.
•SHOW STATUS LIKE ‘Key%’;
• https://kb.askmonty.org/en/show-status/
• https://kb.askmonty.org/en/server-status-variables/
• MariaDB has opened_views, executed_triggers,
executed_events, feature_* as new options
75
SQL Error Logging
Plugin
• Log errors sent to clients in a log file that
can be analysed later. Log file can be rotated
(recommended)
• a MYSQL_AUDIT_PLUGIN
install plugin SQL_ERROR_LOG
soname 'sql_errlog.so';
76

Recommended for you

The Evolution of Open Source Databases
The Evolution of Open Source DatabasesThe Evolution of Open Source Databases
The Evolution of Open Source Databases

The document provides an overview of the evolution of open source databases from the past to present and future. It discusses the early days of navigational and hierarchical databases. It then covers the development of relational databases and SQL. It outlines the rise of open source databases like MySQL, PostgreSQL, and SQLite. It also summarizes the emergence of NoSQL databases and NewSQL systems to handle big data and cloud computing. The document predicts continued development and blending of features between SQL, NoSQL, and NewSQL databases.

open source databasemysqloss
MySQL in the Hosted Cloud
MySQL in the Hosted CloudMySQL in the Hosted Cloud
MySQL in the Hosted Cloud

You want to use MySQL in Amazon RDS, Rackspace Cloud, Google Cloud SQL or HP Helion Public Cloud? Check this out, from Percona Live London 2014. (Note that pricing of Google Cloud SQL changed prices on the same day after the presentation)

amazon rdsrackspacecloud
Maria DBMS
Maria DBMSMaria DBMS
Maria DBMS

This document provides an overview of MariaDB, including: - MariaDB is an open-source database that is a fork of MySQL with additional features and enhancements. - It was first released in 2009 and is overseen by the MariaDB Foundation. SkySQL, formed by former MySQL executives, merged with MariaDB founder Michael "Monty" Widenius' company in 2013. - MariaDB offers various storage engines, new features like dynamic columns and NoSQL access, and generally better performance than MySQL through optimizations and user statistics. It is widely adopted with major investors and supporters.

mariadb; mysql; storage engine; dbms; open source
Audit Plugin
• Log server activity - who connects to the
server, what queries run, what tables touched -
rotating log file or syslogd
• MariaDB has extended the audit API, so user
filtering is possible
• a MYSQL_AUDIT_PLUGIN
INSTALL PLUGIN server_audit SONAME
‘server_audit.so’;
77
Replication: selective
skipping
• All changes that are logged as events in the
binlog are replicated to all slaves
• However, sometimes you want all to be logged
to binlog but skipped replication to slaves
• @@skip_replication (session only)
• replicate_events_marked_for_skip
= replicate|filter_on_slave|
filter_on_master (dynamic)
78
Replication: dynamic
variables
• The variables replicate_do_*,
replicate_ignore_*, and replicate_wild_*
have been made dynamic, so they can be
changed without requiring a server restart.
• https://kb.askmonty.org/en/dynamic-
replication-variables/
79
Replication:Annotation
of RBR events
• MariaDB supports statement & row based
replication (RBR)
• In RBR, the binlog has no SQL statements,
only events are logged (INSERT, DELETE, etc)
• Option to include original SQL statement
(default OFF)
• https://kb.askmonty.org/en/
annotate_rows_log_event/
80

Recommended for you

What is MariaDB Server 10.3?
What is MariaDB Server 10.3?What is MariaDB Server 10.3?
What is MariaDB Server 10.3?

MariaDB Server 10.3 is a culmination of features from MariaDB Server 10.2+10.1+10.0+5.5+5.3+5.2+5.1 as well as a base branch from MySQL 5.5 and backports from MySQL 5.6/5.7. It has many new features, like a GA-ready sharding engine (SPIDER), MyRocks, as well as some Oracle compatibility, system versioned tables and a whole lot more.

mariadb servermysqldatabase
Databases in the hosted cloud
Databases in the hosted cloud Databases in the hosted cloud
Databases in the hosted cloud

Presented at OSCON 2018. A review of what is available from MySQL, MariaDB Server, MongoDB, PostgreSQL, and more. Covering your choices, considerations, versions, access methods, cost, a deeper look at RDS and if you should run your own instances or not.

mysqlclouddatabase
MySQL features missing in MariaDB Server
MySQL features missing in MariaDB ServerMySQL features missing in MariaDB Server
MySQL features missing in MariaDB Server

MySQL features missing in MariaDB Server. Here's an overview from the New York developer's Unconference in February 2018. This is primarily aimed at the developers, to decide what goes into MariaDB 10.4, as opposed to users. High level comparisons are made between MySQL 5.6/5.7 with of course MySQL 8.0 as well. Here's to ensuring MariaDB Server 10/310.4 has more "Drop-in" compatibility.

mysqlmariadbmariadb server
Replication: binlog
event checksums
• Backport from MySQL 5.6 (in MariaDB
5.3+)
• binlog_checksum option
• Slaves perform checksums on events
received & will stop if there is corruption
• https://kb.askmonty.org/en/binlog-event-
checksums/
81
Replication: group
commit in the binary log
•sync_binlog=1,
innodb_flush_log_at_trx_commit
=1
• https://www.facebook.com/note.php?
note_id=10150261692455933
• http://kb.askmonty.org/en/group-commit-for-
the-binary-log
• SHOW STATUS LIKE 'binlog_%commits';
82
Group commit in
MariaDB 5.3 onwards
• Do slow part of prepare() in parallel in
InnoDB (first fsync(), InnoDB group
commit)
• Put transaction in queue, decide commit
order
83
• First in queue runs serial part for all, rest
wait
• Wait for access to the binlog
• Write transactions into binlog, in order,
then sync (second fsync())
• Run the fast part of commit() for all
transactions in order
84

Recommended for you

Databases in the Hosted Cloud
Databases in the Hosted CloudDatabases in the Hosted Cloud
Databases in the Hosted Cloud

With a focus on Amazon AWS RDS MySQL and PostgreSQL, Rackspace cloud, Google Cloud SQL, Microsoft Azure for MySQL and PostgreSQL as well as a hint of the other clouds

postgresqlmysqlcloud
Best practices for MySQL High Availability Tutorial
Best practices for MySQL High Availability TutorialBest practices for MySQL High Availability Tutorial
Best practices for MySQL High Availability Tutorial

Given at O'Reilly Velocity London in October 2017, this tutorial focuses on the current best practices for MySQL High Availability.

mysqlhigh availabilitymariadb
Percona ServerをMySQL 5.6と5.7用に作るエンジニアリング(そしてMongoDBのヒント)
Percona ServerをMySQL 5.6と5.7用に作るエンジニアリング(そしてMongoDBのヒント)Percona ServerをMySQL 5.6と5.7用に作るエンジニアリング(そしてMongoDBのヒント)
Percona ServerをMySQL 5.6と5.7用に作るエンジニアリング(そしてMongoDBのヒント)

Engineering that goes into making Percona Server for MySQL 5.6 & 5.7 different (and a hint of MongoDB) for dbtechshowcase 2017 - the slides also have some Japanese in it. This should help a Japanese audience to read it. If there are questions due to poor translation, do not hesitate to drop me an email (byte@bytebot.net) or tweet: @bytebot

dbtechshowcasehigh availabilityjapan
• Finally, run the slow part of commit() in
parallel (third fsync(), InnoDB group
commit)
• Only 2 context switches per thread (one
sleep, one wakeup)
• Note: MySQL 5.6, MariaDB 10 only does 2
fsyncs/group commit
85
Group commit in
MariaDB 10
• Remove commit in slow part of InnoDB
commit (stage 4)
• Reduce cost of crash-safe binlog
• A binlog checkpoint is a point in the
binlog where no crash recovery is
needed before it. In InnoDB you wait for
flush + fsync its redo log for commit
86
crash-safe binlog
• MariaDB 5.5 checkpoints after every
commit —> quite expensive!
• 5.5/5.6 stalls commits around binlog rotate,
waiting for all prepared transactions to
commit (since crash recovery can only scan
latest binlog file)
87
crash-safe binlog 10.0
• 10.0 makes binlog checkpoints
asynchronous
• A binlog can have no checkpoints at all
• Ability to scan multiple binlogs during
crash recovery
• Remove stalls around binlog rotates
88

Recommended for you

Capacity planning for your data stores
Capacity planning for your data storesCapacity planning for your data stores
Capacity planning for your data stores

Databases require capacity planning (and to those coming from traditional RDBMS solutions, this can be thought of as a sizing guide). Capacity planning prevents resource exhaustion. Capacity planning can be hard. This talk has a heavier leaning on MySQL, but the concepts and addendum will help with any other data store.

rootconfcapacity planningdatabase
Tuning Linux for your database FLOSSUK 2016
Tuning Linux for your database FLOSSUK 2016Tuning Linux for your database FLOSSUK 2016
Tuning Linux for your database FLOSSUK 2016

Some best practices about tuning Linux for your database workloads. The focus is not just on MySQL or MariaDB Server but also on understanding the OS from hardware/cloud, I/O, filesystems, memory, CPU, network, and resources.

linuxmariadbtools
Distributions from the view a package
Distributions from the view a packageDistributions from the view a package
Distributions from the view a package

Having spent more than the last decade being the main point of contact for distributions shipping MySQL, then MariaDB Server, it's clear that working with distributions have many challenges. Licensing changes (when MySQL moved the client libraries from LGPL to GPL with a FOSS Exception), ABI changes, speed (or lack thereof) of distribution releases/freezes, supporting the software throughout the lifespan of the distribution, specific bugs due to platforms, and a lot more will be discussed in this talk. Let's not forget the politics. How do we decide "tiers" of importance for distributions? As a bonus, there will be a focus on how much effort it took to "replace" MySQL with MariaDB. Benefits: if you're making a distribution, this is the point of view of the upstream package makers. Why are distribution statistics important to us? Do we monitor your bugs system or do you have a better escalation to us? How do we test to make sure things are going well before release. This and more will be spoken about. As an upstream project (package), we love nothing more than being available everywhere. But time and energy goes into making this is so as there are quirks in every distribution.

percona serverlinuxfosdem2016
Extensions to the SE
API
• prepare() - write prepared trx in
parallel w/group commit
• prepare_ordered() - called serially, in
commit order
• commit_ordered() - called serially, in
commit order; fast commit to memory
• commit() - commit to disk in parallel,
89
group commit in 10.1
• Tricky locking issues hard to change without getting deadlocks
sometimes
• mysql#68251, mysql#68569
• New code? Binlog rotate in background thread (further reducing
stalls). Split transactions across binlogs, so big transactions do not
lead to big binlog files
• Enhanced semi-sync replication (wait for slave before commit on
the master rather than after commit)
90
Replication: START TRANSACTION
WITH CONSISTENT SNAPSHOT
• Works with the binlog, possible to obtain the binlog position
corresponding to a transactional snapshot of the database without
blocking any other queries.
• by-product of group commit in the binlog to view commit
ordering
• Used by the command mysqldump--single-transaction
--master-data to do a fully non-blocking backup
• Works consistently between transactions involving more than one
storage engine
• https://kb.askmonty.org/en/enhancements-for-start-transaction-
with-consistent/
91
GIS support!
• MySQL has OpenGIS SFS (Simple feature access,
SQL access method)
• Now, SQL with full geometry types
• ST_ prefix (incl. ST_RELATE,
ST_BOUNDARY, etc.)
• MyISAM,Aria for SPATIAL & non-spatial indexes
• When 5.7-InnoDB is merged, it will get
support too
92

Recommended for you

Cool MariaDB Plugins
Cool MariaDB Plugins Cool MariaDB Plugins
Cool MariaDB Plugins

This document discusses MariaDB plugins and provides examples of several useful plugins, including authentication plugins, password validation plugins, SQL error logging, audit logging, query analysis, and more. It encourages contributing plugins to help extend MariaDB's functionality.

mariadbmysqlplugins
Better encryption & security with MariaDB 10.1 & MySQL 5.7
Better encryption & security with MariaDB 10.1 & MySQL 5.7Better encryption & security with MariaDB 10.1 & MySQL 5.7
Better encryption & security with MariaDB 10.1 & MySQL 5.7

Talking about the improvements in MariaDB on MySQL security and encryption features that are so important in today's data landscape. Presented http://www.meetup.com/EffectiveMySQL/events/224828891/

mariadbencryptionmysql
Comparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdfComparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdf

To help you choose the best DiskWarrior alternative, we've compiled a comparison table summarizing the features, pros, cons, and pricing of six alternatives.

data recoverydatadiskwarrior
GIS II
• Spatial reference systems support
(REF_SYSTEM_ID) can be specified as a column
attribute
• INFORMATION_SCHEMA.GEOMETRY_COLUMN
S for queries of references
• Use Osmosis, you can load all OpenStreetMap data
into MariaDB now
• https://mariadb.com/kb/en/gis-features-in-533/
• https://mariadb.com/kb/en/openstreetmap-dataset/
93
Progress reporting
• ALTER TABLE & LOAD DATA INFILE
MariaDB [mail]> alter table mail engine = maria;
Stage: 1 of 2 'copy to tmp table' 17.55% of stage done
MariaDB [mail]> select id, user, db, command, state,
-> time_ms, progress from information_schema.processlist;
+---------+-------------------+-----------+----------+
| command | state | time_ms | progress |
+---------+-------------------+-----------+----------+
| Query | copy to tmp table | 23407.131 | 17.551 |
+---------+-------------------+-----------+----------+
1 row in set (0.47 sec)
94
TIME_MS in
I_S.PROCESSLIST
• Extra column 'TIME_MS' has been added to
the
INFORMATION_SCHEMA.PROCESSLIST
table
• Units of milliseconds with microsecond
precision (the unit and precision of the
'TIME' column is one second).
95
5.7 I_S.PROCESSLIST
+---------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------+---------------------+------+-----+---------+-------+
| ID | bigint(21) unsigned | NO | | 0 | |
| USER | varchar(32) | NO | | | |
| HOST | varchar(64) | NO | | | |
| DB | varchar(64) | YES | | NULL | |
| COMMAND | varchar(16) | NO | | | |
| TIME | int(7) | NO | | 0 | |
| STATE | varchar(64) | YES | | NULL | |
| INFO | longtext | YES | | NULL | |
+---------+---------------------+------+-----+---------+-------+
8 rows in set (0.00 sec)
96

Recommended for you

Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyyActive Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy

Not so much to say

20240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 202420240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 2024

Everything that I found interesting about machines behaving intelligently during June 2024

quantumfaxmachine
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...

Have you noticed the OpenSSF Scorecard badges on the official Dart and Flutter repos? It's Google's way of showing that they care about security. Practices such as pinning dependencies, branch protection, required reviews, continuous integration tests etc. are measured to provide a score and accompanying badge. You can do the same for your projects, and this presentation will show you how, with an emphasis on the unique challenges that come up when working with Dart and Flutter. The session will provide a walkthrough of the steps involved in securing a first repository, and then what it takes to repeat that process across an organization with multiple repos. It will also look at the ongoing maintenance involved once scorecards have been implemented, and how aspects of that maintenance can be better automated to minimize toil.

dartflutteropenssf
10.1 I_S.PROCESSLIST
| TIME_MS | decimal(22,3) | NO | | 0.000 | |
| STAGE | tinyint(2) | NO | | 0 | |
| MAX_STAGE | tinyint(2) | NO | | 0 | |
| PROGRESS | decimal(7,3) | NO | | 0.000 | |
| MEMORY_USED | int(7) | NO | | 0 | |
| EXAMINED_ROWS | int(7) | NO | | 0 | |
| QUERY_ID | bigint(4) | NO | | 0 | |
| INFO_BINARY | blob | YES | | NULL | |
+---------------+---------------+------+-----+---------+-------+
16 rows in set (0.00 sec)
97
New KILL syntax
• HARD | SOFT & USER USERNAME are MariaDB-specific
(5.3.2)
• KILL QUERY ID query_id (10.0.5) - kill by query id, rather
than thread id
• SOFT ensures things that may leave a table in an inconsistent
state aren’t interrupted (like REPAIR or INDEX creation for
MyISAM or Aria)
KILL [HARD | SOFT] [CONNECTION | QUERY]
[thread_id | USER user_name]
98
Statistics
• Understand server activity better to understand database loads
•SET GLOBAL userstat=1;
•SHOW CLIENT_STATISTICS; SHOW USER_STATISTICS;
• # of connections, CPU usage, bytes received/sent, row statistics
•SHOW INDEX_STATISTICS; SHOW TABLE_STATISTICS;
• # rows read, changed, indexes
• INFORMATION_SCHEMA.PROCESSLIST has MEMORY_USAGE,
EXAMINED_ROWS (similar with SHOW STATUS output)
99
MariaDB 10.0+
SphinxSE
100

Recommended for you

Pigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdfPigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdf

Sustainability requires ingenuity and stewardship. Did you know Pigging Solutions pigging systems help you achieve your sustainable manufacturing goals AND provide rapid return on investment. How? Our systems recover over 99% of product in transfer piping. Recovering trapped product from transfer lines that would otherwise become flush-waste, means you can increase batch yields and eliminate flush waste. From raw materials to finished product, if you can pump it, we can pig it.

pigging solutionsprocess piggingproduct transfers
WPRiders Company Presentation Slide Deck
WPRiders Company Presentation Slide DeckWPRiders Company Presentation Slide Deck
WPRiders Company Presentation Slide Deck

YOUR RELIABLE WEB DESIGN & DEVELOPMENT TEAM — FOR LASTING SUCCESS WPRiders is a web development company specialized in WordPress and WooCommerce websites and plugins for customers around the world. The company is headquartered in Bucharest, Romania, but our team members are located all over the world. Our customers are primarily from the US and Western Europe, but we have clients from Australia, Canada and other areas as well. Some facts about WPRiders and why we are one of the best firms around: More than 700 five-star reviews! You can check them here. 1500 WordPress projects delivered. We respond 80% faster than other firms! Data provided by Freshdesk. We’ve been in business since 2015. We are located in 7 countries and have 22 team members. With so many projects delivered, our team knows what works and what doesn’t when it comes to WordPress and WooCommerce. Our team members are: - highly experienced developers (employees & contractors with 5 -10+ years of experience), - great designers with an eye for UX/UI with 10+ years of experience - project managers with development background who speak both tech and non-tech - QA specialists - Conversion Rate Optimisation - CRO experts They are all working together to provide you with the best possible service. We are passionate about WordPress, and we love creating custom solutions that help our clients achieve their goals. At WPRiders, we are committed to building long-term relationships with our clients. We believe in accountability, in doing the right thing, as well as in transparency and open communication. You can read more about WPRiders on the About us page.

web development agencywpriderswordpress development
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdfINDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf

These fighter aircraft have uses outside of traditional combat situations. They are essential in defending India's territorial integrity, averting dangers, and delivering aid to those in need during natural calamities. Additionally, the IAF improves its interoperability and fortifies international military alliances by working together and conducting joint exercises with other air forces.

air force fighter planebiggest submarinezambia port
The old days
• Download MySQL, including sources
• Download SphinxSE for compiling
• Download Sphinx to compile with MySQL
support
• Documented: http://www.howtoforge.com/
sphinx-as-mysql-storage-engine-sphinxse
101
Today
• Install sphinx from your distribution
• Install MariaDB 5.5 from your distribution
or from http://mariadb.org/
• Get started!
102
Getting started
mysql> INSTALL PLUGIN sphinx
SONAME 'ha_sphinx.so';
Query OK, 0 rows affected
(0.01 sec)
103
Another engine appears
104

Recommended for you

Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...

Today’s digitally connected world presents a wide range of security challenges for enterprises. Insider security threats are particularly noteworthy because they have the potential to cause significant harm. Unlike external threats, insider risks originate from within the company, making them more subtle and challenging to identify. This blog aims to provide a comprehensive understanding of insider security threats, including their types, examples, effects, and mitigation techniques.

insider securitycybersecurity threatsenterprise security
Cookies program to display the information though cookie creation
Cookies program to display the information though cookie creationCookies program to display the information though cookie creation
Cookies program to display the information though cookie creation

Java Servlet programs

Measuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at TwitterMeasuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at Twitter

Widya Salim and Victor Ma will outline the causal impact analysis, framework, and key learnings used to quantify the impact of reducing Twitter's network latency.

What is SphinxSE?
• SphinxSE is just the storage engine that still
depends on the Sphinx daemon
• It doesn’t store any data itself
• Its just a built-in client to allow MariaDB to
talk to Sphinx searchd, run queries, obtain
results
• Indexing, searching is performed on Sphinx
105
Configure sphinx!
• /usr/local/sphinx/sphinx.conf
• Source (multiple, include mysql, with
connection info)
• Setup indexer (esp. if its on localhost) -
mem_limit, max_iops, max_iosize
• Setup searchd (where to listen to, query
log, etc.)
106
Use case scenarios
• Already have an existing application that
makes use of full-text-search in MyISAM?
Porting should be easier
• Have a programming language without a
native API for Sphinx? Surely there’s a
connector for MariaDB ;-)
107
Use case scenarios
• Results from Sphinx itself almost always
require additional work involving MariaDB
• Say to pull out text column that Sphinx
index doesn’t store
• JOIN with another table (using a different
engine)
108

Recommended for you

Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024

This presentation explores the practical application of image description techniques. Familiar guidelines will be demonstrated in practice, and descriptions will be developed “live”! If you have learned a lot about the theory of image description techniques but want to feel more confident putting them into practice, this is the presentation for you. There will be useful, actionable information for everyone, whether you are working with authors, colleagues, alone, or leveraging AI as a collaborator. Link to presentation recording and transcript: https://bnctechforum.ca/sessions/details-of-description-part-ii-describing-images-in-practice/ Presented by BookNet Canada on June 25, 2024, with support from the Department of Canadian Heritage.

a11yaccessibilityalt text
How Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdfHow Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdf

In the modern digital era, social media platforms have become integral to our daily lives. These platforms, including Facebook, Instagram, WhatsApp, and Snapchat, offer countless ways to connect, share, and communicate.

social media hackerfacebook hackerhire a instagram hacker
How to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptxHow to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptx

How do we build an IoT product, and make it profitable? Talk from the IoT meetup in March 2024. https://www.meetup.com/iot-sweden/events/299487375/

iot
An example
CREATE TABLE t1
(
id INTEGER UNSIGNED NOT NULL,
weight INTEGER NOT NULL,
query VARCHAR(3072) NOT NULL,
group_id INTEGER,
INDEX(query)
) ENGINE=SPHINX CONNECTION="sphinx://localhost:9312/test";
SELECT * FROM t1 WHERE query='test it;mode=any';
109
Sphinx search tables
• 1st column: INTEGER UNSIGNED or
BIGINT (document ID)
• 2nd column: match weight
• 3rd column: VARCHAR or TEXT (your
query)
• Query column needs indexing, no other
column needs to be
110
What actually happens
• SELECT passes a Sphinx query as the query
column in the WHERE clause
• searchd returns the results
• SphinxSE translates and returns the results
to MariaDB
111
SHOW ENGINE
SPHINX STATUS
• Per-query & per-word statistics that searchd returns are accessible via SHOW STATUS
mysql> SHOW ENGINE SPHINX STATUS;
+--------+-------+-------------------------------------------------+
| Type | Name | Status |
+--------+-------+-------------------------------------------------+
| SPHINX | stats | total: 25, total found: 25, time: 126, words: 2 |
| SPHINX | words | sphinx:591:1256 soft:11076:15945 |
+--------+-------+-------------------------------------------------+
2 rows in set (0.00 sec)
112

Recommended for you

Research Directions for Cross Reality Interfaces
Research Directions for Cross Reality InterfacesResearch Directions for Cross Reality Interfaces
Research Directions for Cross Reality Interfaces

An invited talk given by Mark Billinghurst on Research Directions for Cross Reality Interfaces. This was given on July 2nd 2024 as part of the 2024 Summer School on Cross Reality in Hagenberg, Austria (July 1st - 7th)

augmented realitycross realityvirtual reality
Best Programming Language for Civil Engineers
Best Programming Language for Civil EngineersBest Programming Language for Civil Engineers
Best Programming Language for Civil Engineers

The integration of programming into civil engineering is transforming the industry. We can design complex infrastructure projects and analyse large datasets. Imagine revolutionizing the way we build our cities and infrastructure, all by the power of coding. Programming skills are no longer just a bonus—they’re a game changer in this era. Technology is revolutionizing civil engineering by integrating advanced tools and techniques. Programming allows for the automation of repetitive tasks, enhancing the accuracy of designs, simulations, and analyses. With the advent of artificial intelligence and machine learning, engineers can now predict structural behaviors under various conditions, optimize material usage, and improve project planning.

programmingcodingcivil engineering
Manual | Product | Research Presentation
Manual | Product | Research PresentationManual | Product | Research Presentation
Manual | Product | Research Presentation

Manual Method of Product Research | Helium10 | MBS RETRIEVER

product researchhelium10 | mbs retriever
What queries are
supported?
• Most of the Sphinx API is exposed to SphinxSE
• query, mode, sort, offset, limit, index, minid,
maxid, weights, filter, !filter, range, !range,
maxmatches, groupby, groupsort, indexweights,
comment, select
• Sphinx search modes can also be supported via
_sph attributes
• obtain value of @groupby? use ‘_sph_groupby’
113
Efficiency
• Allow Sphinx to perform sorting, filtering, and slicing
of result set
• ... as opposed to using WHERE, ORDER BY, LIMIT
clauses on MariaDB
• Why?
• Sphinx optimises and performs better on these
tasks
• Less data packed by searchd, and transferred and
unpacked by SphinxSE
114
JOINs
• Perform JOINs on a SphinxSE search table using tables from other engines
SELECT content, date_added FROM test.documents docs
-> JOIN t1 ON (docs.id=t1.id)
-> WHERE query="one document;mode=any";
+-------------------------------------+---------------------+
| content | docdate |
+-------------------------------------+---------------------+
| this is my test document number two | 2006-06-17 14:04:28 |
| this is my test document number one | 2006-06-17 14:04:28 |
+-------------------------------------+---------------------+
2 rows in set (0.00 sec)
115
Statistics
• Understand server activity better to understand database loads
•SET GLOBAL userstat=1;
•SHOW CLIENT_STATISTICS; SHOW USER_STATISTICS;
• # of connections, CPU usage, bytes received/sent, row statistics
•SHOW INDEX_STATISTICS; SHOW TABLE_STATISTICS;
• # rows read, changed, indexes
• INFORMATION_SCHEMA.PROCESSLIST has MEMORY_USAGE,
EXAMINED_ROWS (similar with SHOW STATUS output)
116
MariaDB 10.0+

Recommended for you

Advanced Techniques for Cyber Security Analysis and Anomaly Detection
Advanced Techniques for Cyber Security Analysis and Anomaly DetectionAdvanced Techniques for Cyber Security Analysis and Anomaly Detection
Advanced Techniques for Cyber Security Analysis and Anomaly Detection

Cybersecurity is a major concern in today's connected digital world. Threats to organizations are constantly evolving and have the potential to compromise sensitive information, disrupt operations, and lead to significant financial losses. Traditional cybersecurity techniques often fall short against modern attackers. Therefore, advanced techniques for cyber security analysis and anomaly detection are essential for protecting digital assets. This blog explores these cutting-edge methods, providing a comprehensive overview of their application and importance.

cybersecurityanomaly detectionadvanced techniques
20240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 202420240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 2024

Everything that I found interesting last month about the irresponsible use of machine intelligence

quantumfaxmachine
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - MydbopsScaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops

This presentation, delivered at the Postgres Bangalore (PGBLR) Meetup-2 on June 29th, 2024, dives deep into connection pooling for PostgreSQL databases. Aakash M, a PostgreSQL Tech Lead at Mydbops, explores the challenges of managing numerous connections and explains how connection pooling optimizes performance and resource utilization. Key Takeaways: * Understand why connection pooling is essential for high-traffic applications * Explore various connection poolers available for PostgreSQL, including pgbouncer * Learn the configuration options and functionalities of pgbouncer * Discover best practices for monitoring and troubleshooting connection pooling setups * Gain insights into real-world use cases and considerations for production environments This presentation is ideal for: * Database administrators (DBAs) * Developers working with PostgreSQL * DevOps engineers * Anyone interested in optimizing PostgreSQL performance Contact info@mydbops.com for PostgreSQL Managed, Consulting and Remote DBA Services

postgresqlpgsqldatabase
Table Elimination
• Resolve a query without accessing some
tables query refers to
• Great for querying highly normalised data
• Basis of “anchor modelling”
• http://www.anchormodeling.com/
• SQL Server 2005/2008, Oracle 11g have it
117
Virtual columns
• A column in a table that has its value
automatically calculated either with a pre-
calculated/deterministic expression or values
of other fields in the table
• PERSISTENT (computed when data is inserted
or stored in a table) orVIRTUAL (like aVIEW)
• Similar to MS SQL or Oracle
• https://kb.askmonty.org/en/virtual-columns/
118
Optimizer
enchancements
• Join additions
• block nested loop joins for outer-joins, block hash joins,
Batched Key Access (BKA)
• Optimization for derived tables & views
• mergeable derived tables processed likeVIEWs +
optimizer creates indexes over materialized derived
tables
• Disk access optimization
• Index Condition Pushdown (ICP), Multi-Range Read
(MRR)
119
Subquery optimizations
• Semi-join optimization,
materialization for non-
correlated IN queries,
subquery cache
• Goodbye rewriting as
JOINs or separate
queries
DBT-3, 60M rows, 29GB XtraDB
120

Recommended for you

How RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptxHow RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptx

Revolutionize your transportation processes with our cutting-edge RPA software. Automate repetitive tasks, reduce costs, and enhance efficiency in the logistics sector with our advanced solutions.

rpa in transportationrpa in transportation industryrpa in transportation sector
121
EXPLAIN
• INSTANT EXPLAIN
• EXPLAIN Analyzer -
https://mariadb.org/
explain_analyzer/
analyze/
• Optimizer feature
comparison matrix:
https://kb.askmonty.org/
en/optimizer-feature-
comparison-matrix/
• optimizer_switch
meanings: https://
mariadb.com/kb/en/
mariadb-53-
optimizer_switch/
122
DBT-3
• https://mariadb.com/kb/
en/dbt-3-dataset/
• https://blog.mariadb.org/
mariadb-5-3-optimizer-
benchmark/
123
Extended keys
• Default is extended_keys=on
• Extended Keys, introduced in MariaDB 5.5, is an
optimization which makes use of existing
components of InnoDB/XtraDB keys to generate
more efficient execution plans. Using these
components in many cases allows the server to
generate execution plans which employ index-
only look-ups.
• https://mariadb.com/kb/en/extended-keys/
124

Recommended for you

NoSQL: HandlerSocket
• Comes with HandlerSocket
• direct access to XtraDB/InnoDB for
CRUD operations
• INSTALL PLUGIN handlersocket
SONAME 'handlersocket.so';
• This allows applications to
communicate more directly with
MySQL storage engines, without the
overhead associated with using SQL.
This includes operations such as
parsing and optimising queries, as
well as table handling operations
(opening, locking, unlocking, closing).
125
NoSQL: dynamic
columns
• Allows you to create virtual columns with dynamic content for
each row in table
• Basically a BLOB with handling functions
• Store different attributes for each item (like a web store). Hard to
do relationally
• In MariaDB 10.0: name support (instead of referring to columns by
numbers, name it), convert all dynamic column content to JSON
array, interface with Cassandra
• INSERT INTO tbl SET
dyncol_blob=COLUMN_CREATE("column_name", "value");
• https://kb.askmonty.org/en/dynamic-columns/
126
Pluggable
authentication
• MariaDB & MySQL now uses password
authentication via pluggable auth
• Unix sockets
• PAM
127
auth_socket
• Authenticates against the Unix socket file
• Uses so_peercred socket option to
obtain information about user running client
•CREATE USER ‘byte’@‘localhost’
IDENTIFIED with auth_socket;
• Refuses connection of any other user but
byte from connecting
128

Recommended for you

PAM Authentication
• MySQL PAM
• Percona PAM (auth_pam &
auth_pam_compat)
• MariaDB PAM (pam)
129
Let’s get somethings
out of the way
• PAM = Pluggable Authentication Module
• Use pam_ldap to to authenticate
credentials against LDAP server —
configure /etc/pam_ldap.conf (you also
obviously need /etc/ldap.conf)
• Simplest way is of course /etc/shadow auth
130
MariaDB
INSTALL SONAME ‘auth_pam’;
CREATE USER byte IDENTIFIED via pam
USING ‘mariadb’;
Edit /etc/pam.d/mariadb:
auth required
pam_unix.so
account required
pam_unix.so
131
For MySQL
compatibility
• Just use —pam-use-cleartext-
plugin for MySQL to use
mysql_cleartext_password instead of dialog
plugin
132

Recommended for you

Possible errors
• Connectors don’t support it:
• Client does not support authentication
protocol requested by server; consider
upgrading MySQL client.
• You really have to re-compile connector
using libmysqlclient to have said support
133
MariaDB 10.0
134
Why MariaDB 10.0?
• The 5.5 merge took about a year (!)
• We (MariaDB-5.5) have over 1.5 million
lines of extra code with a ~61MB diff
• We didn’t want to repeat this for 5.6
• Also, MySQL 5.6 has a lot of re-factoring,
thus loosing commit history
135
In a nutshell
• Built on MariaDB 5.5
• Backported features from MySQL 5.6
• New features
136

Recommended for you

What about tools?
• SELECTVERSION() will
return 10.0.1-MariaDB
• Oops, we found a bug in
MySQL: https://
mariadb.atlassian.net/
browse/MDEV-4088 &
http://bugs.mysql.com/
bug.php?id=68187
• Still deciding:
• Use 9.0 for a name
• Lie to clients (no)
• Disallow replication
(no)
• Use handshake packet
5.5.30-mysql-10.0.2-
MariaDB without
affectingVERSION() /
@@global.version
137
What about tools II?
• Tools really should recognise MariaDB
version as there are already many new
features that MySQL doesn’t have
• eg. HeidiSQL supports virtual columns
(http://www.heidisql.com/forum.php?
t=8671)
138
Backported features
(i.e. these are from MySQL 5.6)
139
InnoDB & XtraDB
• MariaDB 10.0 ships InnoDB from MySQL 5.6
• MariaDB 10 ships Percona XtraDB as default
• minimal performance improvements expected,
just functionality & features
• bitmap changed page tracking so xtrabackup
can do incremental backups without scanning
all InnoDB files
• SHOW GLOBALVARIABLES LIKE 'innodb_ver%';
140

Recommended for you

More from MySQL 5.6
• PERFORMANCE_SCHEMA
• InnoDB read-only transactions (TRANSACTION READ
ONLY)
• Optimizer:
• EXISTS-TO-IN optimization
• ORDER BY...LIMIT optimization (show only few rows
of a result set)
• CURRENT_TIMESTAMP as DEFAULT for DATETIME
columns (this is a re-implementation in MariaDB)
141
In MariaDB 10.0
the new stuff!
142
MariaDB 10 replication
• Global Transaction ID
• have complex replication topologies; simple failover & slave promotion
• doesn’t require restarts!
• new slave provisioning: SET GLOBAL GTID_SLAVE_POS =
BINLOG_GTID_POS("masterbin.00045", 600); CHANGE MASTER TO
master_host="192.168.2.4", master_use_gtid=slave_pos; START
SLAVE;
• turning on GTID for slaves: STOP SLAVE

CHANGE MASTER TO master_use_gtid=current_pos; START SLAVE;
• change masters: STOP SLAVE

CHANGE MASTER TO master_host="10.2.3.5"; START SLAVE;
• Crash-safe slaves - GTID position stored in InnoDB table
143
Why different GTID
compared to 5.6?
• MySQL 5.6 GTID does not support multi-
source replication
• Supports —log-slave-updates=0 for
efficiency
• Enabled by default
144

Recommended for you

Binlog (size matters!)
• Example query: INSERT INTO t1VALUES
(10,“foo”);
• MySQL 5.6… 265 bytes
• MariaDB 10.0… 161 bytes
145
Crash-safe slave (w/
InnoDB DML)
• Replace non-transactional file relay_log.info
with transactional
mysql.rpl_slave_state
• Changes to rpl_slave_state are
transactionally recovered after crash along
with user data.
146
Replication domains
• Keep central concept that replication is just applying events
in-order from a serial binlog stream.
• Allow multi-source replication with multiple active masters
• Let’s the DBA configure multiple independent binlog streams
(one per active master: mysqld --git-domain-id=#)
• Events within one stream are ordered the same across
entire replication topology
• Events between different streams can be in different order
on different servers
• Binlog position is one ID per replication domain
147
Parallel replication
• Multi-source replication from different masters executed
in parallel
• Queries from different domains are executed in parallel
• Queries that are run in parallel on the master are run in
parallel on the slave (based on group commit).
• Transactions modifying the same table can be updated
in parallel on the slave!
• Supports both statement based and row based replication.
148

Recommended for you

Multi-source replication
• Work from Taobao
• Many users partition data across many masters... now you
can replicate many masters to a single slave
• Great for analytical queries, complete backups, etc.
• @@default_master_connection contains current
connection name (used if connection name is not given)
• All master/slave commands take a connection name now
(like CHANGE MASTER “connection_name”, SHOW SLAVE
“connection_name” STATUS, etc.)
• https://kb.askmonty.org/en/multi-source-replication/
149
Only in 10.0
• SHOW EXPLAIN for
<thread_id> (https://
mariadb.com/kb/en/show-
explain/) gets the query plan
of a running statement
• EXPLAIN ANALYZE
• Faster ALTER TABLE with
unique keys for Aria &
MyISAM
• Segmented MyISAM
keycaches (up to 64) since
MariaDB 5.2 exist too
• Per-thread memory usage
(Taobao)
• I_S.PROCESSLIST has
MEMORY_USAGE &
EXAMINED_ROWS
• SHOW STATUS has
memory usage too
150
SHUTDOWN
• shuts down the server; requires GRANTs
similar to mysqladmin shutdown command
• you can create an event that does a
SHUTDOWN of the server as an
example…
• https://mariadb.com/kb/en/shutdown/
151
CassandraSE
152

Recommended for you

CassandraSE
• Integration with NoSQL/Big Data DB,Apache Cassandra cluster,
seen as a storage engine to MariaDB
• Combine (join) data between Cassandra & MariaDB
• Write to Cassandra from SQL (SELECT, INSERT, UPDATE,
DELETE)
• CQL is great, but the goal is for you to just work with SQL, not
switch between CQL & SQL
• Data is mapped: rowkey, static columns, dynamic columns
• super columns aren’t supported
• No 1-1 direct map for data types (ref: https://kb.askmonty.org/en/
cassandra-storage-engine/)
153
TokuDB
• Opensource - separate MariaDB 5.5+TokuDB/
integrated in 10.0.5
• Improved insert (10-20x faster) & query speed,
compression (up to 90% space reduction),
replication performance and online schema
flexibility
• Uses Fractal Tree Indexes instead of B-Tree
• Tests & builds of TokuDB on multiple platforms
(think greater distribution)
154
CONNECT
• CONNECT will speak XML or even grab
data over an ODBC connection
• You can CONNECT to Oracle (via
ODBC), join results from Cassandra (via
CassandraSE) and have all your results sit in
InnoDB
• Turn on engine condition pushdown (10.1
not required)
155
SPIDER
• Spider has built-in sharding features
• Partitioning & XA transaction capable
• Different MariaDB instance tables handled
like it is the same instance
156

Recommended for you

Engine-independent
persistent statistics
• InnoDB has persistent statistics in MySQL
5.6; we have an engine-independent version
• These statistics aren’t limited by the SE API,
and are used by query optimizer to choose
best execution plan for each statement
• Statistics collected for non-indexed
columns too (unlike InnoDB’s)
157
MariaDB 10.0.2
• Support for atomic writes on FusionIO
DirectFS
• Optimizer collects & can use histogram-based
statistics for non-indexed columns
• Better table discovery, so FederatedX has
assisted discovery, Sequence engine (creates
ascending/descending sequences, useful in joins)
• SHOW PLUGINS SONAME;
158
MariaDB 10.0.4
• SPIDER storage engine for database sharding
merged
• Audit plugin
• complete PERFORMANCE_SCHEMA
• INFORMATION_SCHEMA with upstream
defaults too
• Online ALTER for InnoDB and thread
information for in-place operations
159
MariaDB 10.0.5
• Parallel replication - https://mariadb.com/
kb/en/parallel-replication/
• automatically detect independent
transactions, parallel within same table,
adapts to master load, and preserves
commit ordering
• EXPLAIN in the slow query log
160

Recommended for you

MariaDB 10.0.6
• Serious incompatibility and data corruption
of DATETIME and DATE types due to
get_innobase_type_from_mysql_type
refactor combined with InnoDB Online DDL
• https://mariadb.atlassian.net/browse/
MDEV-5248
• Fixed upgrades from MySQL 5.1 -> MariaDB
• Parallel replication improvements
161
MariaDB 10.0.7
• Mostly bug fixes, to stabilise the code
• XtraDB 5.6 merged (InnoDB still default)
• OQGraph v3 - stores data on disk,
persistent, larger graph support
• INFORMATION_SCHEMA.METADATA_L
OCK_INFO plugin to see active metadata
locks
162
PCRE Regular
Expressions
• Powerful REGEXP/RLIKE operator
• New operators:
• REGEXP_REPLACE(sub,pattern,replace)
• REGEXP_INSTR(sub,pattern)
• REGEXP_SUBSTR(sub,pattern)
• Works with multi-byte character sets that
MariaDB supports, including East-Asian sets
163
Roles
• Bundles users together, with similar
privileges - follows the SQL standard
CREATE ROLE audit_bean_counters;
GRANT SELECT ON accounts.* to
audit_bean_counters;
GRANT audit_bean_counters to
ceo;
164

Recommended for you

MariaDB 10.0.9 (RC)
• InnoDB 5.6.15 (XtraDB
default; InnoDB plugin)
• Extended keys
optimization on by
default
• MASTER_GTID_WAIT(
) + @@last_gtid
• TIME casted to
DATETIME, date is
CURRENT_DATE not
0000-00-00 - SQL
standards compliant
• @@old_mode=ZER
O_DATE_TIME_CAS
T
165
MariaDB 10.0.10 (GA)
• audit plugin now ships
• XtraDB performance fixed incorrect
calculation of flushed pages
• TokuDB compression is now
TOKUDB_ZLIB
• Engine independent table statistics
improved
166
Now, 10.1
167
Galera Cluster
integrated
• Full integration of Galera Cluster 3.9 (will be 4) into
MariaDB 10.1 — it won’t be a separate download
• no lost transactions
• optimisations for WAN replication
• non-blocking DDL
• no limits on transaction size
•Server version: 10.1.3-MariaDB-wsrep MariaDB
Server, wsrep_25.10.r4144
• Granular monitoring in INFORMATION_SCHEMA —
WSREP_MEMBERSHIP, WSREP_STATUS
168

Recommended for you

Encryption
• Encryption: tablespace and table level encryption with
support for rolling keys using the AES algorithm
• table encryption — PAGE_ENCRYPTION=1
• tablespace encryption — encrypts everything including
log files
• New file_key_management_filename,
file_key_management_filekey,
file_key_management_encryption_algorithm
• Well documented — https://mariadb.com/kb/en/mariadb/
data-at-rest-encryption/
169
Encryption II
• The key file contains encryption keys
identifiers (32-bit numbers) and hex-
encoded encryption keys (128-256 bit
keys), separated by a semicolon.
• don’t forget to create keys!
• eg. openssl enc -aes-256-cbc -
md sha1 -k secret -in
keys.txt -out keys.enc
170
my.cnf config
[mysqld]
plugin-load-add=file_key_management.so
file-key-management
file-key-management-filename = /home/mdb/keys.enc
innodb-encrypt-tables
innodb-encrypt-log
innodb-encryption-threads=4
aria-encrypt-tables=1 # PAGE row format
encrypt-tmp-disk-tables=1 # this is for Aria
171
Encryption III
CREATE TABLE customer (
customer_id bigint not null primary
key,
customer_name varchar(80),
customer_creditcard varchar(20))
ENGINE=InnoDB
page_encryption=1
page_encryption_key=1;
172

Recommended for you

Encryption IV
• Tablespace encryption (Google)
• again, you need to pick an encryption algorithm
• specify what to encrypt: innodb-encrypt-tables,
aria, aria-encrypt-tables, encrypt-
tmp-disk-tables, innodb-encrypt-log
• don’t forget key rotation:
•innodb-encryption-threads=4
•innodb-encryption-rotate-key-
age=1800
173
EncryptionV
• we also have tablespace scrubbing
• background process that regularly scans
through the tables and upgrades the
encryption keys
• scrubbing works for tablespaces and logs
• —encrypt-tmp-files
• —encrypt-binlog
174
EncryptionVI
•/etc/my.cnf.d/enable_encryption.preset
• Consider using Eperi Gateway for Databases
• MariaDB Enterprise has a plugin for Amazon Key
Management Server (KMS)
• mysqlbinlog has no way to read (i.e. decrypt) an
encrypted binlog
• This does not work with MariaDB Galera Cluster yet
(gcache is not encrypted yet), and also xtrabackup needs
additional work (i.e. if you encrypt the redo log)
175
Optimistic parallel
replication
• Before, transactions committed in parallel on the
master could be run in parallel
• Now, more than one transaction will be
considered to be run in parallel giving another
performance boost in master-to-slave replication
• We have to check if this only will work with a 10.1
master
• Isn’t fully pushed (or documented) yet — see:
https://mariadb.atlassian.net/browse/MDEV-6676
176

Recommended for you

Threadpool
• thread_pool_high_prio_mode
• thread_pool_high_prio_tickets
• MDEV-5533
• This brings in improvements made in
Percona Server to the threadpool
177
InnoDB improvements
• Multi-threaded flush (also in 5.7, different
implementation)
• Page compression (optimised for Flash, SSD, FusionIO)
• 64KB pages in InnoDB (old limit = 16KB).
• Defragementation (FB, backported by DaumKakao)
• Forced primary key
• If option is true, create table without primary key or
unique key where all keyparts are NOT NULL is not
accepted. Instead an error message is printed.
178
InnoDB WebScaleSQL
• MDEV-6936: Buffer pool list scan optimisation
• MDEV-6929: Port Facebook Prefix Index Queries Optimization
• MDEV-6932: Enable Lazy Flushing
• MDEV-6931: Page cleaner should do LRU flushing regardless of server
activity
• fixes mysql#71988, mysql#70500
•  DB-746 merge clustering key is covering key for mariadb 10 (TokuDB)
• MDEV-6933: Spurious lock_wait_timeout_thread wakeup in
lock_wait_suspend_thread()
• fixes mysql#72123
179
Per query variables
• Long history (http://www.bytebot.net/blog/
archives/2014/05/04/per-query-variable-
settings-in-mysqlpercona-
serverwebscalesql)
•SET STATEMENT
max_statement_time=1000 FOR
SELECT name FROM name ORDER
BY name;
180

Recommended for you

Statement timeouts
• from Twitter patch; re-written by monty
• MAX_STATEMENT_TIME to abort long
running queries
• We call it “query timeouts” + have a
different syntax
• https://mariadb.atlassian.net/browse/
MDEV-4427
181
Optimiser
enhancements
• UNION ALL without temporary tables (5.7)
• Improve ORDER BY in optimiser
• Mostly there is EXPLAIN JSON (like 5.6)*
• EXPLAIN ANALYZE with FORMAT=JSON
• includes data from the query execution itself —
this is MariaDB only
• https://mariadb.com/kb/en/mariadb/analyze-
formatjson-examples/
182
EXPLAIN ANALYZE
MariaDB [information_schema]> explain format=json select * from
all_pluginsG
*************************** 1. row ***************************
EXPLAIN: {
"query_block": {
"select_id": 1,
"table": {
"table_name": "all_plugins",
"access_type": "ALL"
}
}
}
1 row in set (0.01 sec)
183
WebScaleSQL
• WebScaleSQL improvements
• https://mariadb.atlassian.net/browse/
MDEV-6039
• Lots of running thru AddressSanitizer
(ASan)
• Many of these also get backported to
10.0.13
184

Recommended for you

Passwords
• Password validation plugin exists now
• https://mariadb.com/kb/en/mariadb/development/mariadb-
internals-documentation/password-validation/
• simple_password_check password validation plugin
• can enforce a minimum password length and guarantee that a
password contains at least a specified number of uppercase
and lowercase letters, digits, and punctuation characters.
• cracklib_password_check password validation plugin
• Allows passwords that are strong enough to pass CrackLib
test.This is the same test that pam_cracklib.so does
185
Audit plugin
improvements
• Monitor access, locate errors, etc.
• Connection — connect/disconnect/failed;
Query — DDL/DML+TCL/DCL; Object —
Database/Tables
• Passwords in 1.2 replaced by a placeholder
(filtered, i.e. not in audit log)
186
CONNECT
• CONNECT having full JSON/BSON support
• Can read filename.json files with ease
• Writing — INSERT, UPDATE, DELETE is
supported — however, if you have added/
modified values for objects or arrays, there
can be complications (similar like the XML
type object issue)
• Works with Sveta’s JSON UDFs as well
187
Other bits
• Slaves can execute triggers now
• Dump thread enhancements (remove binlog
lock LOCK_log) from 5.7 included (Google)
• CREATE or REPLACE for most database
objects minus indexes
• SET DEFAULT ROLE (there is a default role
now for current user)
188

Recommended for you

Other bits
• FRM files are now not created for temporary
tables
• INFORMATION_SCHEMA.SYSTEM_VARIABLES
- information for system variables
• Compiled with security hardening options (fortify
source - https://mariadb.atlassian.net/browse/
MDEV-5730)
• @@sql_log_slow can now be controlled on a
session basis (not just globally)
189
GIS
• Full compliance for the OGC standards around GIS.
• yes, we are missing a few functions, but its likely to
improve
• MDEV-4045 Missing OGC Spatial functions.
• MDEV-60 Support for Spatial Reference systems for the
GIS data.
• MDEV-12 OpenGIS: create required tables:
GeometryColumns, related views.
• Speaking shortly, the MariaDB GIS part is now OpenGIS
compliant, and passes all the OpenGIS conformance tests
190
Kerberos/GSSAPI
• Every participant in authenticated communication is
known as a ‘principal’ (w/unique name)
• Principals belong to administrative groups called
realms. Kerberos Distribution Centre maintains a
database of principal in realm + associated secret keys
• Client requests a ticket from KDC for access to a
specific asset. KDC uses the client’s secret and the
server’s secret to construct the ticket which allows
the client and server to mutually authenticate each
other, while keeping the secrets hidden.
191
MariaDB Kerberos
plugin
• User principals: <username>@<KERBEROS
REALM>
•CREATE USER 'byte' IDENTIFIED VIA
kerberos AS ‘byte/mariadb@lp';
• so that is <username>/
<instance>@<KERBEROS REALM>
• Store Service Principal Name (SPN) is an option
in a config file
192

Recommended for you

Works where?
• GSSAPI-based Kerberos widely used &
supported on Linux
• Windows supports SSPI authentication and
the plugin supports it
• Comes with MariaDB Server 10.1
193
Show list of compiled-
in locales
• INSTALL SONAME 'locales';
SELECT * FROM INFORMATION_SCHEMA.LOCALES;
+-----+-------+-------------------------------------+-----------------------
+---------------------+---------------+--------------+------------------------+
| ID | NAME | DESCRIPTION | MAX_MONTH_NAME_LENGTH |
MAX_DAY_NAME_LENGTH | DECIMAL_POINT | THOUSAND_SEP | ERROR_MESSAGE_LANGUAGE |
+-----+-------+-------------------------------------+-----------------------
+---------------------+---------------+--------------+------------------------+
| 0 | en_US | English - United States | 9 |
9 | . | , | english |
| 1 | en_GB | English - United Kingdom | 9 |
9 | . | , | english |
| 2 | ja_JP | Japanese - Japan | 3 |
3 | . | , | japanese |
194
Still use the query
cache?
• Show the contents of the query cache
• Querying the table acquires the QC lock, so lock
waits for queries using/expiring QC
• INSTALL PLUGIN query_cache_info SONAME
‘query_cache_info';
• select statement_schema, statement_text,
result_blocks_count,
• result_blocks_size from
information_schema.query_cache_info;
195
Query response time
• (range_base ^ n; range_base ^ (n+1)]
• INSTALL SONAME ‘query_response_time';
• SHOW QUERY_RESPONSE_TIME;
• https://www.percona.com/doc/percona-
server/5.6/diagnostics/
response_time_distribution.html
196

Recommended for you

Compatibility
• Temporary tables are stored in Aria but now there
is a —default-tmp-storage-engine option
• engine_condition_pushdown flag removed (its
always on for engines that support it)
• --mysql56-temporal-format option to use the
MySQL-5.6 low level formats to store TIME,
DATETIME and TIMESTAMP types
• PERFORMANCE_SCHEMA disabled by default
like in 10.0
197
Caveats (for 100%
compatibility)
• GTID implemented differently from 5.6
• InnoDB memcached
• Optimizer trace
• mysqlbinlog streaming server
• Time-delayed replication
198
Looking forward to
MariaDB Server 10.2
• mysqlbinlog streaming server backup
• Window functions
• CREATE USER for limiting resource usage
• Virtual column improvements
• EXPLAIN JSON gets better
• Common Table Expressions
199
Support
• Five years from every release
• MariaDB 5.5 in Red Hat Enterprise Linux 7
• MariaDB 10 in SUSE Enterprise Linux 12
200

Recommended for you

Benchmarks
• “Lies, damned lies, and statistics” - Mark Twain
• http://blog.mariadb.org/sysbench-oltp-
mysql-5-6-vs-mariadb-10-0/
• http://dimitrik.free.fr/blog/archives/2013/02/
mysql-performance-mysql-56-vs-mysql-55-
vs-mariadb-55.html
• One thing is clear: there needs to be more
benchmarking done
201
MariaDB deployed
“MariaDB had these same bugs that we ran into with
MySQL. However the big difference was that when we
reported these bugs, they were quickly resolved within 48
hours!” -- Dreas van Donselaar, Chief Technology Officer,
SpamExperts
B.V. after migrating over 300 servers from MySQL 5.0
to MariaDB 5.1.
“Migrating from MySQL 5.1 to MariaDB 5.2 was as simple
as removing MySQL RPMs and installing the MariaDB
packages, then running mysql_upgrade.” - Panayot Belchev,
proprietor, Host Bulgaria on providing
MariaDB to over 7,000 of their web hosting customers.
“We made the switch on Saturday --
and we’re seeing benefits already -- our
daily optimization time is down from
24 minutes to just 4 minutes” -- Ali
Watters, CEO, travelblog.org
happy users: pap.fr, Paybox Services, OLX, Jelastic,
Web of Trust,Wikipedia, Craigslist, etc.
“@nginxorg & @mariadb
have helped me save
$12000/year in
infrastructure cost. I love it!
Do more with less!” -
Ewdison Then, CEO,
Slashgear
We upgraded the support.mozilla.org
databases from Percona 5.1 to MariaDB 5.5.
One of the engineers and I had a
conversation where he mentioned that “one
of our worst performing views on SUMO is
doing waaaayyy better with the upgraded
databases”, that it “seems more stable” and
that “I stopped receiving ‘MySQL went away
or disconnected emails’ which came in once
in a while.” - Sheeri Cabral, Mozilla IT
202
Resources
• http://mariadb.org/
• https://mariadb.com/kb/en/
• http://planet.mysql.com/
• http://planetmariadb.org/
203
Books!
1. MariaDB Crash Course, Ben Forta (September 2011)
2. Getting Started with MariaDB, Daniel Bartholomew (October 2013)
3. MariaDB Cookbook, Daniel Bartholomew (March 2014)
4. Real MariaDB, Matt Lee (April 2014)
5. Building a Web Application with PHP & MariaDB:A Reference Guide,
Sai Srinivas Sriparasa (June 2014)
6. MariaDB: Beginners Guide, Rodrigo Ribeiro (August 2014)
7. Mastering MariaDB, Federico Razzioli (September 2014)
8. MariaDB High Performance, Pierre Mavro (September 2014)
9. Learning MySQL & MariaDB, Russell Dyer (April 2015)
204

Recommended for you

205
Rate My Session!
Q&A
colin.charles@percona.com | byte@bytebot.net
slides: slideshare.net/bytebot
http://bytebot.net/blog/ | @bytebot on twitter
http://www.percona.com/
206

More Related Content

What's hot

Errant GTIDs breaking replication @ Percona Live 2019
Errant GTIDs breaking replication @ Percona Live 2019Errant GTIDs breaking replication @ Percona Live 2019
Errant GTIDs breaking replication @ Percona Live 2019
Dieter Adriaenssens
 
Linux and H/W optimizations for MySQL
Linux and H/W optimizations for MySQLLinux and H/W optimizations for MySQL
Linux and H/W optimizations for MySQL
Yoshinori Matsunobu
 
Running MariaDB in multiple data centers
Running MariaDB in multiple data centersRunning MariaDB in multiple data centers
Running MariaDB in multiple data centers
MariaDB plc
 
MariaDB Galera Cluster
MariaDB Galera ClusterMariaDB Galera Cluster
MariaDB Galera Cluster
Abdul Manaf
 
MariaDB 10.11 key features overview for DBAs
MariaDB 10.11 key features overview for DBAsMariaDB 10.11 key features overview for DBAs
MariaDB 10.11 key features overview for DBAs
Federico Razzoli
 
The Full MySQL and MariaDB Parallel Replication Tutorial
The Full MySQL and MariaDB Parallel Replication TutorialThe Full MySQL and MariaDB Parallel Replication Tutorial
The Full MySQL and MariaDB Parallel Replication Tutorial
Jean-François Gagné
 
MySQL GTID Concepts, Implementation and troubleshooting
MySQL GTID Concepts, Implementation and troubleshooting MySQL GTID Concepts, Implementation and troubleshooting
MySQL GTID Concepts, Implementation and troubleshooting
Mydbops
 
mysql 8.0 architecture and enhancement
mysql 8.0 architecture and enhancementmysql 8.0 architecture and enhancement
mysql 8.0 architecture and enhancement
lalit choudhary
 
MySQL Performance Schema in MySQL 8.0
MySQL Performance Schema in MySQL 8.0MySQL Performance Schema in MySQL 8.0
MySQL Performance Schema in MySQL 8.0
Mayank Prasad
 
MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)
MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)
MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)
Jean-François Gagné
 
Open Source 101 2022 - MySQL Indexes and Histograms
Open Source 101 2022 - MySQL Indexes and HistogramsOpen Source 101 2022 - MySQL Indexes and Histograms
Open Source 101 2022 - MySQL Indexes and Histograms
Frederic Descamps
 
Galera cluster for high availability
Galera cluster for high availability Galera cluster for high availability
Galera cluster for high availability
Mydbops
 
Query Optimization with MySQL 5.6: Old and New Tricks - Percona Live London 2013
Query Optimization with MySQL 5.6: Old and New Tricks - Percona Live London 2013Query Optimization with MySQL 5.6: Old and New Tricks - Percona Live London 2013
Query Optimization with MySQL 5.6: Old and New Tricks - Percona Live London 2013
Jaime Crespo
 
An Overview to MySQL SYS Schema
An Overview to MySQL SYS Schema An Overview to MySQL SYS Schema
An Overview to MySQL SYS Schema
Mydbops
 
MySQL Performance Schema in Action
MySQL Performance Schema in ActionMySQL Performance Schema in Action
MySQL Performance Schema in Action
Sveta Smirnova
 
Dd and atomic ddl pl17 dublin
Dd and atomic ddl pl17 dublinDd and atomic ddl pl17 dublin
Dd and atomic ddl pl17 dublin
Ståle Deraas
 
MySQL Parallel Replication: inventory, use-case and limitations
MySQL Parallel Replication: inventory, use-case and limitationsMySQL Parallel Replication: inventory, use-case and limitations
MySQL Parallel Replication: inventory, use-case and limitations
Jean-François Gagné
 
How to Manage Scale-Out Environments with MariaDB MaxScale
How to Manage Scale-Out Environments with MariaDB MaxScaleHow to Manage Scale-Out Environments with MariaDB MaxScale
How to Manage Scale-Out Environments with MariaDB MaxScale
MariaDB plc
 
MariaDB Performance Tuning Crash Course
MariaDB Performance Tuning Crash CourseMariaDB Performance Tuning Crash Course
MariaDB Performance Tuning Crash Course
Severalnines
 
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11
Kenny Gryp
 

What's hot (20)

Errant GTIDs breaking replication @ Percona Live 2019
Errant GTIDs breaking replication @ Percona Live 2019Errant GTIDs breaking replication @ Percona Live 2019
Errant GTIDs breaking replication @ Percona Live 2019
 
Linux and H/W optimizations for MySQL
Linux and H/W optimizations for MySQLLinux and H/W optimizations for MySQL
Linux and H/W optimizations for MySQL
 
Running MariaDB in multiple data centers
Running MariaDB in multiple data centersRunning MariaDB in multiple data centers
Running MariaDB in multiple data centers
 
MariaDB Galera Cluster
MariaDB Galera ClusterMariaDB Galera Cluster
MariaDB Galera Cluster
 
MariaDB 10.11 key features overview for DBAs
MariaDB 10.11 key features overview for DBAsMariaDB 10.11 key features overview for DBAs
MariaDB 10.11 key features overview for DBAs
 
The Full MySQL and MariaDB Parallel Replication Tutorial
The Full MySQL and MariaDB Parallel Replication TutorialThe Full MySQL and MariaDB Parallel Replication Tutorial
The Full MySQL and MariaDB Parallel Replication Tutorial
 
MySQL GTID Concepts, Implementation and troubleshooting
MySQL GTID Concepts, Implementation and troubleshooting MySQL GTID Concepts, Implementation and troubleshooting
MySQL GTID Concepts, Implementation and troubleshooting
 
mysql 8.0 architecture and enhancement
mysql 8.0 architecture and enhancementmysql 8.0 architecture and enhancement
mysql 8.0 architecture and enhancement
 
MySQL Performance Schema in MySQL 8.0
MySQL Performance Schema in MySQL 8.0MySQL Performance Schema in MySQL 8.0
MySQL Performance Schema in MySQL 8.0
 
MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)
MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)
MySQL Parallel Replication: All the 5.7 and 8.0 Details (LOGICAL_CLOCK)
 
Open Source 101 2022 - MySQL Indexes and Histograms
Open Source 101 2022 - MySQL Indexes and HistogramsOpen Source 101 2022 - MySQL Indexes and Histograms
Open Source 101 2022 - MySQL Indexes and Histograms
 
Galera cluster for high availability
Galera cluster for high availability Galera cluster for high availability
Galera cluster for high availability
 
Query Optimization with MySQL 5.6: Old and New Tricks - Percona Live London 2013
Query Optimization with MySQL 5.6: Old and New Tricks - Percona Live London 2013Query Optimization with MySQL 5.6: Old and New Tricks - Percona Live London 2013
Query Optimization with MySQL 5.6: Old and New Tricks - Percona Live London 2013
 
An Overview to MySQL SYS Schema
An Overview to MySQL SYS Schema An Overview to MySQL SYS Schema
An Overview to MySQL SYS Schema
 
MySQL Performance Schema in Action
MySQL Performance Schema in ActionMySQL Performance Schema in Action
MySQL Performance Schema in Action
 
Dd and atomic ddl pl17 dublin
Dd and atomic ddl pl17 dublinDd and atomic ddl pl17 dublin
Dd and atomic ddl pl17 dublin
 
MySQL Parallel Replication: inventory, use-case and limitations
MySQL Parallel Replication: inventory, use-case and limitationsMySQL Parallel Replication: inventory, use-case and limitations
MySQL Parallel Replication: inventory, use-case and limitations
 
How to Manage Scale-Out Environments with MariaDB MaxScale
How to Manage Scale-Out Environments with MariaDB MaxScaleHow to Manage Scale-Out Environments with MariaDB MaxScale
How to Manage Scale-Out Environments with MariaDB MaxScale
 
MariaDB Performance Tuning Crash Course
MariaDB Performance Tuning Crash CourseMariaDB Performance Tuning Crash Course
MariaDB Performance Tuning Crash Course
 
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11
 

Viewers also liked

The MySQL Server Ecosystem in 2016
The MySQL Server Ecosystem in 2016The MySQL Server Ecosystem in 2016
The MySQL Server Ecosystem in 2016
Colin Charles
 
The Proxy Wars - MySQL Router, ProxySQL, MariaDB MaxScale
The Proxy Wars - MySQL Router, ProxySQL, MariaDB MaxScaleThe Proxy Wars - MySQL Router, ProxySQL, MariaDB MaxScale
The Proxy Wars - MySQL Router, ProxySQL, MariaDB MaxScale
Colin Charles
 
Lessons from {distributed,remote,virtual} communities and companies
Lessons from {distributed,remote,virtual} communities and companiesLessons from {distributed,remote,virtual} communities and companies
Lessons from {distributed,remote,virtual} communities and companies
Colin Charles
 
Securing your MySQL / MariaDB Server data
Securing your MySQL / MariaDB Server dataSecuring your MySQL / MariaDB Server data
Securing your MySQL / MariaDB Server data
Colin Charles
 
Best practices for MySQL/MariaDB Server/Percona Server High Availability
Best practices for MySQL/MariaDB Server/Percona Server High AvailabilityBest practices for MySQL/MariaDB Server/Percona Server High Availability
Best practices for MySQL/MariaDB Server/Percona Server High Availability
Colin Charles
 
Forking Successfully - or is a branch better?
Forking Successfully - or is a branch better?Forking Successfully - or is a branch better?
Forking Successfully - or is a branch better?
Colin Charles
 
Lessons from database failures
Lessons from database failuresLessons from database failures
Lessons from database failures
Colin Charles
 
MariaDB Server Compatibility with MySQL
MariaDB Server Compatibility with MySQLMariaDB Server Compatibility with MySQL
MariaDB Server Compatibility with MySQL
Colin Charles
 
Lessons from database failures
Lessons from database failures Lessons from database failures
Lessons from database failures
Colin Charles
 
MariaDB 10.1 what's new and what's coming in 10.2 - Tokyo MariaDB Meetup
MariaDB 10.1   what's new and what's coming in 10.2 - Tokyo MariaDB MeetupMariaDB 10.1   what's new and what's coming in 10.2 - Tokyo MariaDB Meetup
MariaDB 10.1 what's new and what's coming in 10.2 - Tokyo MariaDB Meetup
Colin Charles
 
MariaDB - the "new" MySQL is 5 years old and everywhere (LinuxCon Europe 2015)
MariaDB - the "new" MySQL is 5 years old and everywhere (LinuxCon Europe 2015)MariaDB - the "new" MySQL is 5 years old and everywhere (LinuxCon Europe 2015)
MariaDB - the "new" MySQL is 5 years old and everywhere (LinuxCon Europe 2015)
Colin Charles
 
Lessons from database failures
Lessons from database failuresLessons from database failures
Lessons from database failures
Colin Charles
 
Hexatier - MySQL Role-based Security & Data Masking
Hexatier - MySQL Role-based Security & Data MaskingHexatier - MySQL Role-based Security & Data Masking
Hexatier - MySQL Role-based Security & Data Masking
Scott Uhrick
 
cPanelCon 2014: InnoDB Anatomy
cPanelCon 2014: InnoDB AnatomycPanelCon 2014: InnoDB Anatomy
cPanelCon 2014: InnoDB Anatomy
Ryan Robson
 
A beginners guide to MariaDB
A beginners guide to MariaDBA beginners guide to MariaDB
A beginners guide to MariaDB
Colin Charles
 
Meet MariaDB Server 10.1 London MySQL meetup December 2015
Meet MariaDB Server 10.1 London MySQL meetup December 2015Meet MariaDB Server 10.1 London MySQL meetup December 2015
Meet MariaDB Server 10.1 London MySQL meetup December 2015
Colin Charles
 
Meet MariaDB 10.1 at the Bulgaria Web Summit
Meet MariaDB 10.1 at the Bulgaria Web SummitMeet MariaDB 10.1 at the Bulgaria Web Summit
Meet MariaDB 10.1 at the Bulgaria Web Summit
Colin Charles
 
My first moments with MongoDB
My first moments with MongoDBMy first moments with MongoDB
My first moments with MongoDB
Colin Charles
 
MariaDB Server & MySQL Security Essentials 2016
MariaDB Server & MySQL Security Essentials 2016MariaDB Server & MySQL Security Essentials 2016
MariaDB Server & MySQL Security Essentials 2016
Colin Charles
 
MySQL Server Backup, Restoration, And Disaster Recovery Planning Presentation
MySQL Server Backup, Restoration, And Disaster Recovery Planning PresentationMySQL Server Backup, Restoration, And Disaster Recovery Planning Presentation
MySQL Server Backup, Restoration, And Disaster Recovery Planning Presentation
Colin Charles
 

Viewers also liked (20)

The MySQL Server Ecosystem in 2016
The MySQL Server Ecosystem in 2016The MySQL Server Ecosystem in 2016
The MySQL Server Ecosystem in 2016
 
The Proxy Wars - MySQL Router, ProxySQL, MariaDB MaxScale
The Proxy Wars - MySQL Router, ProxySQL, MariaDB MaxScaleThe Proxy Wars - MySQL Router, ProxySQL, MariaDB MaxScale
The Proxy Wars - MySQL Router, ProxySQL, MariaDB MaxScale
 
Lessons from {distributed,remote,virtual} communities and companies
Lessons from {distributed,remote,virtual} communities and companiesLessons from {distributed,remote,virtual} communities and companies
Lessons from {distributed,remote,virtual} communities and companies
 
Securing your MySQL / MariaDB Server data
Securing your MySQL / MariaDB Server dataSecuring your MySQL / MariaDB Server data
Securing your MySQL / MariaDB Server data
 
Best practices for MySQL/MariaDB Server/Percona Server High Availability
Best practices for MySQL/MariaDB Server/Percona Server High AvailabilityBest practices for MySQL/MariaDB Server/Percona Server High Availability
Best practices for MySQL/MariaDB Server/Percona Server High Availability
 
Forking Successfully - or is a branch better?
Forking Successfully - or is a branch better?Forking Successfully - or is a branch better?
Forking Successfully - or is a branch better?
 
Lessons from database failures
Lessons from database failuresLessons from database failures
Lessons from database failures
 
MariaDB Server Compatibility with MySQL
MariaDB Server Compatibility with MySQLMariaDB Server Compatibility with MySQL
MariaDB Server Compatibility with MySQL
 
Lessons from database failures
Lessons from database failures Lessons from database failures
Lessons from database failures
 
MariaDB 10.1 what's new and what's coming in 10.2 - Tokyo MariaDB Meetup
MariaDB 10.1   what's new and what's coming in 10.2 - Tokyo MariaDB MeetupMariaDB 10.1   what's new and what's coming in 10.2 - Tokyo MariaDB Meetup
MariaDB 10.1 what's new and what's coming in 10.2 - Tokyo MariaDB Meetup
 
MariaDB - the "new" MySQL is 5 years old and everywhere (LinuxCon Europe 2015)
MariaDB - the "new" MySQL is 5 years old and everywhere (LinuxCon Europe 2015)MariaDB - the "new" MySQL is 5 years old and everywhere (LinuxCon Europe 2015)
MariaDB - the "new" MySQL is 5 years old and everywhere (LinuxCon Europe 2015)
 
Lessons from database failures
Lessons from database failuresLessons from database failures
Lessons from database failures
 
Hexatier - MySQL Role-based Security & Data Masking
Hexatier - MySQL Role-based Security & Data MaskingHexatier - MySQL Role-based Security & Data Masking
Hexatier - MySQL Role-based Security & Data Masking
 
cPanelCon 2014: InnoDB Anatomy
cPanelCon 2014: InnoDB AnatomycPanelCon 2014: InnoDB Anatomy
cPanelCon 2014: InnoDB Anatomy
 
A beginners guide to MariaDB
A beginners guide to MariaDBA beginners guide to MariaDB
A beginners guide to MariaDB
 
Meet MariaDB Server 10.1 London MySQL meetup December 2015
Meet MariaDB Server 10.1 London MySQL meetup December 2015Meet MariaDB Server 10.1 London MySQL meetup December 2015
Meet MariaDB Server 10.1 London MySQL meetup December 2015
 
Meet MariaDB 10.1 at the Bulgaria Web Summit
Meet MariaDB 10.1 at the Bulgaria Web SummitMeet MariaDB 10.1 at the Bulgaria Web Summit
Meet MariaDB 10.1 at the Bulgaria Web Summit
 
My first moments with MongoDB
My first moments with MongoDBMy first moments with MongoDB
My first moments with MongoDB
 
MariaDB Server & MySQL Security Essentials 2016
MariaDB Server & MySQL Security Essentials 2016MariaDB Server & MySQL Security Essentials 2016
MariaDB Server & MySQL Security Essentials 2016
 
MySQL Server Backup, Restoration, And Disaster Recovery Planning Presentation
MySQL Server Backup, Restoration, And Disaster Recovery Planning PresentationMySQL Server Backup, Restoration, And Disaster Recovery Planning Presentation
MySQL Server Backup, Restoration, And Disaster Recovery Planning Presentation
 

Similar to The Complete MariaDB Server tutorial

The Complete MariaDB Server Tutorial - Percona Live 2015
The Complete MariaDB Server Tutorial - Percona Live 2015The Complete MariaDB Server Tutorial - Percona Live 2015
The Complete MariaDB Server Tutorial - Percona Live 2015
Colin Charles
 
Mariadb10 和新项目中有什么
Mariadb10 和新项目中有什么Mariadb10 和新项目中有什么
Mariadb10 和新项目中有什么
YUCHENG HU
 
MariaDB 10 and what's new with the project
MariaDB 10 and what's new with the projectMariaDB 10 and what's new with the project
MariaDB 10 and what's new with the project
Colin Charles
 
Maria db 10 and the mariadb foundation(colin)
Maria db 10 and the mariadb foundation(colin)Maria db 10 and the mariadb foundation(colin)
Maria db 10 and the mariadb foundation(colin)
kayokogoto
 
The MySQL Server ecosystem in 2016
The MySQL Server ecosystem in 2016The MySQL Server ecosystem in 2016
The MySQL Server ecosystem in 2016
Colin Charles
 
The MySQL Server ecosystem in 2016
The MySQL Server ecosystem in 2016The MySQL Server ecosystem in 2016
The MySQL Server ecosystem in 2016
sys army
 
MariaDB - Fast, Easy & Strong - Get Started Tutorial
MariaDB - Fast, Easy & Strong - Get Started TutorialMariaDB - Fast, Easy & Strong - Get Started Tutorial
MariaDB - Fast, Easy & Strong - Get Started Tutorial
phamhphuc
 
MariaDB: The 2012 Edition
MariaDB: The 2012 EditionMariaDB: The 2012 Edition
MariaDB: The 2012 Edition
Colin Charles
 
The MySQL ecosystem - understanding it, not running away from it!
The MySQL ecosystem - understanding it, not running away from it! The MySQL ecosystem - understanding it, not running away from it!
The MySQL ecosystem - understanding it, not running away from it!
Colin Charles
 
MariaDB 初学者指南
MariaDB 初学者指南MariaDB 初学者指南
MariaDB 初学者指南
YUCHENG HU
 
Why MariaDB?
Why MariaDB?Why MariaDB?
Why MariaDB?
Colin Charles
 
Databases in the hosted cloud
Databases in the hosted cloudDatabases in the hosted cloud
Databases in the hosted cloud
Colin Charles
 
MariaDB 10: A MySQL Replacement - HKOSC
MariaDB 10: A MySQL Replacement - HKOSC MariaDB 10: A MySQL Replacement - HKOSC
MariaDB 10: A MySQL Replacement - HKOSC
Colin Charles
 
Differences between MariaDB 10.3 & MySQL 8.0
Differences between MariaDB 10.3 & MySQL 8.0Differences between MariaDB 10.3 & MySQL 8.0
Differences between MariaDB 10.3 & MySQL 8.0
Colin Charles
 
MariaDB - a MySQL Replacement #SELF2014
MariaDB - a MySQL Replacement #SELF2014MariaDB - a MySQL Replacement #SELF2014
MariaDB - a MySQL Replacement #SELF2014
Colin Charles
 
Introduction of MariaDB 2017 09
Introduction of MariaDB 2017 09Introduction of MariaDB 2017 09
Introduction of MariaDB 2017 09
GOTO Satoru
 
Open11 maria db the new m in lamp
Open11 maria db the new m in lampOpen11 maria db the new m in lamp
Open11 maria db the new m in lamp
Colin Charles
 
The Evolution of Open Source Databases
The Evolution of Open Source DatabasesThe Evolution of Open Source Databases
The Evolution of Open Source Databases
Ivan Zoratti
 
MySQL in the Hosted Cloud
MySQL in the Hosted CloudMySQL in the Hosted Cloud
MySQL in the Hosted Cloud
Colin Charles
 
Maria DBMS
Maria DBMSMaria DBMS
Maria DBMS
Ramez Al-Fayez
 

Similar to The Complete MariaDB Server tutorial (20)

The Complete MariaDB Server Tutorial - Percona Live 2015
The Complete MariaDB Server Tutorial - Percona Live 2015The Complete MariaDB Server Tutorial - Percona Live 2015
The Complete MariaDB Server Tutorial - Percona Live 2015
 
Mariadb10 和新项目中有什么
Mariadb10 和新项目中有什么Mariadb10 和新项目中有什么
Mariadb10 和新项目中有什么
 
MariaDB 10 and what's new with the project
MariaDB 10 and what's new with the projectMariaDB 10 and what's new with the project
MariaDB 10 and what's new with the project
 
Maria db 10 and the mariadb foundation(colin)
Maria db 10 and the mariadb foundation(colin)Maria db 10 and the mariadb foundation(colin)
Maria db 10 and the mariadb foundation(colin)
 
The MySQL Server ecosystem in 2016
The MySQL Server ecosystem in 2016The MySQL Server ecosystem in 2016
The MySQL Server ecosystem in 2016
 
The MySQL Server ecosystem in 2016
The MySQL Server ecosystem in 2016The MySQL Server ecosystem in 2016
The MySQL Server ecosystem in 2016
 
MariaDB - Fast, Easy & Strong - Get Started Tutorial
MariaDB - Fast, Easy & Strong - Get Started TutorialMariaDB - Fast, Easy & Strong - Get Started Tutorial
MariaDB - Fast, Easy & Strong - Get Started Tutorial
 
MariaDB: The 2012 Edition
MariaDB: The 2012 EditionMariaDB: The 2012 Edition
MariaDB: The 2012 Edition
 
The MySQL ecosystem - understanding it, not running away from it!
The MySQL ecosystem - understanding it, not running away from it! The MySQL ecosystem - understanding it, not running away from it!
The MySQL ecosystem - understanding it, not running away from it!
 
MariaDB 初学者指南
MariaDB 初学者指南MariaDB 初学者指南
MariaDB 初学者指南
 
Why MariaDB?
Why MariaDB?Why MariaDB?
Why MariaDB?
 
Databases in the hosted cloud
Databases in the hosted cloudDatabases in the hosted cloud
Databases in the hosted cloud
 
MariaDB 10: A MySQL Replacement - HKOSC
MariaDB 10: A MySQL Replacement - HKOSC MariaDB 10: A MySQL Replacement - HKOSC
MariaDB 10: A MySQL Replacement - HKOSC
 
Differences between MariaDB 10.3 & MySQL 8.0
Differences between MariaDB 10.3 & MySQL 8.0Differences between MariaDB 10.3 & MySQL 8.0
Differences between MariaDB 10.3 & MySQL 8.0
 
MariaDB - a MySQL Replacement #SELF2014
MariaDB - a MySQL Replacement #SELF2014MariaDB - a MySQL Replacement #SELF2014
MariaDB - a MySQL Replacement #SELF2014
 
Introduction of MariaDB 2017 09
Introduction of MariaDB 2017 09Introduction of MariaDB 2017 09
Introduction of MariaDB 2017 09
 
Open11 maria db the new m in lamp
Open11 maria db the new m in lampOpen11 maria db the new m in lamp
Open11 maria db the new m in lamp
 
The Evolution of Open Source Databases
The Evolution of Open Source DatabasesThe Evolution of Open Source Databases
The Evolution of Open Source Databases
 
MySQL in the Hosted Cloud
MySQL in the Hosted CloudMySQL in the Hosted Cloud
MySQL in the Hosted Cloud
 
Maria DBMS
Maria DBMSMaria DBMS
Maria DBMS
 

More from Colin Charles

What is MariaDB Server 10.3?
What is MariaDB Server 10.3?What is MariaDB Server 10.3?
What is MariaDB Server 10.3?
Colin Charles
 
Databases in the hosted cloud
Databases in the hosted cloud Databases in the hosted cloud
Databases in the hosted cloud
Colin Charles
 
MySQL features missing in MariaDB Server
MySQL features missing in MariaDB ServerMySQL features missing in MariaDB Server
MySQL features missing in MariaDB Server
Colin Charles
 
Databases in the Hosted Cloud
Databases in the Hosted CloudDatabases in the Hosted Cloud
Databases in the Hosted Cloud
Colin Charles
 
Best practices for MySQL High Availability Tutorial
Best practices for MySQL High Availability TutorialBest practices for MySQL High Availability Tutorial
Best practices for MySQL High Availability Tutorial
Colin Charles
 
Percona ServerをMySQL 5.6と5.7用に作るエンジニアリング(そしてMongoDBのヒント)
Percona ServerをMySQL 5.6と5.7用に作るエンジニアリング(そしてMongoDBのヒント)Percona ServerをMySQL 5.6と5.7用に作るエンジニアリング(そしてMongoDBのヒント)
Percona ServerをMySQL 5.6と5.7用に作るエンジニアリング(そしてMongoDBのヒント)
Colin Charles
 
Capacity planning for your data stores
Capacity planning for your data storesCapacity planning for your data stores
Capacity planning for your data stores
Colin Charles
 
Tuning Linux for your database FLOSSUK 2016
Tuning Linux for your database FLOSSUK 2016Tuning Linux for your database FLOSSUK 2016
Tuning Linux for your database FLOSSUK 2016
Colin Charles
 
Distributions from the view a package
Distributions from the view a packageDistributions from the view a package
Distributions from the view a package
Colin Charles
 
Cool MariaDB Plugins
Cool MariaDB Plugins Cool MariaDB Plugins
Cool MariaDB Plugins
Colin Charles
 
Better encryption & security with MariaDB 10.1 & MySQL 5.7
Better encryption & security with MariaDB 10.1 & MySQL 5.7Better encryption & security with MariaDB 10.1 & MySQL 5.7
Better encryption & security with MariaDB 10.1 & MySQL 5.7
Colin Charles
 

More from Colin Charles (11)

What is MariaDB Server 10.3?
What is MariaDB Server 10.3?What is MariaDB Server 10.3?
What is MariaDB Server 10.3?
 
Databases in the hosted cloud
Databases in the hosted cloud Databases in the hosted cloud
Databases in the hosted cloud
 
MySQL features missing in MariaDB Server
MySQL features missing in MariaDB ServerMySQL features missing in MariaDB Server
MySQL features missing in MariaDB Server
 
Databases in the Hosted Cloud
Databases in the Hosted CloudDatabases in the Hosted Cloud
Databases in the Hosted Cloud
 
Best practices for MySQL High Availability Tutorial
Best practices for MySQL High Availability TutorialBest practices for MySQL High Availability Tutorial
Best practices for MySQL High Availability Tutorial
 
Percona ServerをMySQL 5.6と5.7用に作るエンジニアリング(そしてMongoDBのヒント)
Percona ServerをMySQL 5.6と5.7用に作るエンジニアリング(そしてMongoDBのヒント)Percona ServerをMySQL 5.6と5.7用に作るエンジニアリング(そしてMongoDBのヒント)
Percona ServerをMySQL 5.6と5.7用に作るエンジニアリング(そしてMongoDBのヒント)
 
Capacity planning for your data stores
Capacity planning for your data storesCapacity planning for your data stores
Capacity planning for your data stores
 
Tuning Linux for your database FLOSSUK 2016
Tuning Linux for your database FLOSSUK 2016Tuning Linux for your database FLOSSUK 2016
Tuning Linux for your database FLOSSUK 2016
 
Distributions from the view a package
Distributions from the view a packageDistributions from the view a package
Distributions from the view a package
 
Cool MariaDB Plugins
Cool MariaDB Plugins Cool MariaDB Plugins
Cool MariaDB Plugins
 
Better encryption & security with MariaDB 10.1 & MySQL 5.7
Better encryption & security with MariaDB 10.1 & MySQL 5.7Better encryption & security with MariaDB 10.1 & MySQL 5.7
Better encryption & security with MariaDB 10.1 & MySQL 5.7
 

Recently uploaded

Comparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdfComparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdf
Andrey Yasko
 
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyyActive Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
RaminGhanbari2
 
20240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 202420240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 2024
Matthew Sinclair
 
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Chris Swan
 
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdfPigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions
 
WPRiders Company Presentation Slide Deck
WPRiders Company Presentation Slide DeckWPRiders Company Presentation Slide Deck
WPRiders Company Presentation Slide Deck
Lidia A.
 
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdfINDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
jackson110191
 
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Bert Blevins
 
Cookies program to display the information though cookie creation
Cookies program to display the information though cookie creationCookies program to display the information though cookie creation
Cookies program to display the information though cookie creation
shanthidl1
 
Measuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at TwitterMeasuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at Twitter
ScyllaDB
 
Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024
BookNet Canada
 
How Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdfHow Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdf
HackersList
 
How to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptxHow to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptx
Adam Dunkels
 
Research Directions for Cross Reality Interfaces
Research Directions for Cross Reality InterfacesResearch Directions for Cross Reality Interfaces
Research Directions for Cross Reality Interfaces
Mark Billinghurst
 
Best Programming Language for Civil Engineers
Best Programming Language for Civil EngineersBest Programming Language for Civil Engineers
Best Programming Language for Civil Engineers
Awais Yaseen
 
Manual | Product | Research Presentation
Manual | Product | Research PresentationManual | Product | Research Presentation
Manual | Product | Research Presentation
welrejdoall
 
Advanced Techniques for Cyber Security Analysis and Anomaly Detection
Advanced Techniques for Cyber Security Analysis and Anomaly DetectionAdvanced Techniques for Cyber Security Analysis and Anomaly Detection
Advanced Techniques for Cyber Security Analysis and Anomaly Detection
Bert Blevins
 
20240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 202420240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 2024
Matthew Sinclair
 
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - MydbopsScaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Mydbops
 
How RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptxHow RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptx
SynapseIndia
 

Recently uploaded (20)

Comparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdfComparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdf
 
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyyActive Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
 
20240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 202420240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 2024
 
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
 
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdfPigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdf
 
WPRiders Company Presentation Slide Deck
WPRiders Company Presentation Slide DeckWPRiders Company Presentation Slide Deck
WPRiders Company Presentation Slide Deck
 
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdfINDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
 
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
 
Cookies program to display the information though cookie creation
Cookies program to display the information though cookie creationCookies program to display the information though cookie creation
Cookies program to display the information though cookie creation
 
Measuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at TwitterMeasuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at Twitter
 
Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024
 
How Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdfHow Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdf
 
How to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptxHow to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptx
 
Research Directions for Cross Reality Interfaces
Research Directions for Cross Reality InterfacesResearch Directions for Cross Reality Interfaces
Research Directions for Cross Reality Interfaces
 
Best Programming Language for Civil Engineers
Best Programming Language for Civil EngineersBest Programming Language for Civil Engineers
Best Programming Language for Civil Engineers
 
Manual | Product | Research Presentation
Manual | Product | Research PresentationManual | Product | Research Presentation
Manual | Product | Research Presentation
 
Advanced Techniques for Cyber Security Analysis and Anomaly Detection
Advanced Techniques for Cyber Security Analysis and Anomaly DetectionAdvanced Techniques for Cyber Security Analysis and Anomaly Detection
Advanced Techniques for Cyber Security Analysis and Anomaly Detection
 
20240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 202420240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 2024
 
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - MydbopsScaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
 
How RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptxHow RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptx
 

The Complete MariaDB Server tutorial

  • 1. The Complete MariaDB Server Tutorial Colin Charles, Chief Evangelist, Percona Inc. colin.charles@percona.com / byte@bytebot.net http://www.bytebot.net/blog/ | @bytebot on Twitter Percona Live Europe Amsterdam, Netherlands 3 October 2016
  • 3. whoami • Chief Evangelist (in the CTO office), Percona Inc • Founding team of MariaDB Server (2009-2016), previously at Monty Program Ab, merged with SkySQL Ab, now MariaDB Corporation • Formerly MySQL AB (exit: Sun Microsystems) • Past lives include Fedora Project (FESCO), OpenOffice.org • MySQL Community Contributor of theYear Award winner 2014 3
  • 4. MariaDB is very social • facebook: fb.com/MariaDB.dbms • twitter: @MariaDB • g+: plus.google.com/+mariadb/ • Tweet things you learn with #mariadb 4
  • 5. Agenda • This talk is about MariaDB Server from the MariaDB Foundation • There is no focus on MariaDB MaxScale or MariaDB ColumnStore from the MariaDB Corporation 5
  • 7. Who are you? • Database Administrator (DBA) • Developer • Database Architect (DA) 7
  • 8. Database Experience • MySQL • 4.1 or earlier? • 5.0 • 5.1 • 5.5 • 5.6 • MariaDB • 5.1 • 5.2 • 5.3 • 5.5 • 10.0 8
  • 9. Understanding releases • Alpha • Beta • Release Candidate • Stable (GA) • Labs • Developer Milestone Releases (DMR) 9
  • 10. What is MariaDB? 10 • Community developed • Feature enhanced • MariaDB doesn’t depend on MySQL for development - many features are developed independently of MySQL • Backwards compatible with MySQL • (kind of) feature complete • replication supported for easy migration
  • 11. Aims of MariaDB • Compatible, drop-in replacement to MySQL • your application shouldn’t care that its running MariaDB, easy upgrade (uninstall mysql, install mariadb, continue ops!) • Stable (bug-free) releases with no regressions • GPLv2 11
  • 12. 6 years, many server releases • MariaDB 5.1, GA February 2010 • MariaDB 5.2, GA November 2010 • MariaDB 5.3, GA February 2012 • MariaDB 5.5, GA April 2012 • MariaDB Galera Cluster, GA March 2013 • MariaDB 10.0.10 (March 2014) • MariaDB 10.1.8 (October 2015) 12
  • 13. 13
  • 14. MariaDB 5.6? • There will never be a MariaDB 5.6 - the numbers have changed • Many companies will still continue to support both MySQL and MariaDB releases 14
  • 17. Importance of understanding MariaDB (and MySQL) • Generics are inefficient • Since you have chosen MariaDB: • maximise its strengths • minimise its weaknesses 17
  • 18. Sample databases to play with • http://dev.mysql.com/doc/index-other.html • sakila sample database, world database (used in MySQL training), menagerie database (used in book: Beginning MySQL), employees database (large dataset, comes with data - best to play with) 18
  • 19. Picking hardware • Just use 64-bit hardware • VM’s are improving to use 64-bit OSes & software • Physical > virtual • Disk: battery backed storage, plan for RAID usage • MariaDB 10.1 has optimisations for flash/SSD/ FusionIO 19
  • 20. Testing MySQL • Use MySQL Sandbox • http://mysqlsandbox.net/ • Express one-click MySQL installs • make_sandbox foo.tar.gz • Does not require root privileges 20
  • 21. Installation • Binaries (tarballs) are available at http://mariadb.org/ (source too) • Built, tested by MariaDB • Graphical installer & configuration for Microsoft Windows, with HeidiSQL GUI • Up-to-date predictable release schedule • RPM, DEB packages are provided, includingYUM & APT repositories • Use the repository configuration tool • Inside Linux/*BSD distributions • Easy to install, basic defaults, may be older than upstream 21
  • 22. Upgrades • Review changelogs carefully, even for minor versions • Make backups (using xtrabackup) • Don’t forget to run mysql_upgrade • by default with a distribution package • Replication can reduce downtime by upgrading the slave, promoting it, then upgrading the master 22
  • 23. Upgrading from MySQL 5.0 • MariaDB 5.1 fixes upgrades better than MySQL 5.1 handles this • InnoDB + Archive tables upgraded properly • mysql_upgrade, mysqlcheck have more options to see what’s going on • mysqlcheck wrong warnings removed • MySQL 5.1 -> MariaDB 5.1 is “drop-in” • https://mariadb.com/kb/en/upgrading-to-mariadb-from- mysql/ 23
  • 24. Packages (RPM example) • MariaDB-common • character sets • MariaDB-shared • latest libmysqlclient, some plugins, /etc/my.cnf.d/ • MariaDB-compat • compatible client libraries that replace mysql-libs • MariaDB-server • The actual server! • MariaDB-client • mysql client utilities • MariaDB-test • test suite • MariaDB-devel • development headers enabling you to build your own package • MariaDB-CassandraSE • plugin for CassandraSE 24
  • 25. What is libmysqlclient? • Client libraries • Many applications are compiled against libmysqlclient • It is an Application Binary Interface (ABI) • When you write in Java & use Connector/J, Connector/J is compiled against libmysqlclient • Similarly with PHP & Connector/PHP 25
  • 26. MySQL utilities • Why does MariaDB use all the same client utilities? • Because the aim is to be a compatible drop-in replacement • There are very few non-MySQL utilities shipped: aria_chk, aria_dump_log, aria_ftdump, aria_pack, aria_read_log • xtstat (PBXT) is deprecated in MariaDB 5.5 onwards • mytop as it adds features not-present upstream 26
  • 27. Finding help • How do you know what CLI options to use? • Use the man(ual) pages! •man mysql • man <command_name> usually works for any CLI command • HELP SELECT in mysql works too (help tables) - HELP <operator> 27
  • 28. Error messages • perror is a great tool • MariaDB-specific errors are 1900 and above • https://mariadb.com/kb/en/mariadb-error- codes/#mariadb-specific-error-codes 28
  • 29. mysql_secure_insta llation • Now that you’ve tested MySQL works fine (by default, no root password), it’s time to ensure you secure the installation • Set root password • Remove anonymous users • Disallow remote root login • Remove test database • Reload privileges 29
  • 30. mysqladmin • Manage user accounts, passwords, permissions • Display mysqld settings & status counters • Shutdown, create, drop databases shell> mysqladmin processlist shell> mysqladmin extended-status shell> mysqladmin -uroot -p create wordpress 30 SHOW PROCESSLIST SHOW STATUS
  • 31. mysqldump • Dump schema and/or data to .sql file, tab • Useful for backups, transferring data • Locks for consistency, so troublesome shell> mysqldump --all-databases > backup.sql shell> mysqldump --all-databases --single-transaction > backup.sql 31
  • 32. Other tools • There are many other command line tools... • Front-ends • HeidiSQL • Webyog’s SQLyog • Sequel Pro (OSX) 32
  • 34. Making client connections • TCP/IP is available on all platforms • disable using --skip-networking • Socket files available on Unix • fastest communication path • MySQL connections are generally cheap • If you have many short running queries (typical web app), you benefit from MariaDB threadpool • Set connection limit max_connections=n in my.cnf 34
  • 35. Connection Pool • mysqld’s main thread listens for connections • Each connection has a thread assigned to it • Threads can be: • created newly • reused from thread cache • User authentication processed based on hostname, username & password • Client specific buffers for session variables are allocated 35
  • 36. How a query is processed 36
  • 37. Query Cache • Stores SELECT queries and their result sets • Subquery cache exists only in MariaDB • Frequently changed table data will cause queries to naturally be missed • Regularly replaced these days with memcached, et al. 37
  • 38. SQL Parser • Lexical scanner & grammar rules • Parse SQL into tokens • Apply grammar rules to check statement validity • Construct a parse tree for Optimizer to use 38
  • 39. Optimizer • Reads the parse tree and calculates the best query execution plan (QEP) to handle query • find indexes • determine JOIN order • eliminate unnecessary tables • etc. • The optimizer is smart, don’t try to force query plans 39
  • 40. Pluggable Storage Engines • MariaDB can use many storage engines with different features • Installed/removed on fly with INSTALL/ UNINSTALL PLUGIN • Mixing & matching on same server, even on same query 40
  • 41. Value proposition • Unmatched flexibility + customisation potential • MEMORY engine for performance/routine lookup data • Right storage engine can improve performance in many applications • ARCHIVE compresses data, up to 80% • Partners & community benefit from this 41
  • 42. What makes engines different? • Storage: how the data is stored on disk • Or in NDB (memory+disk), CassandraSE (access a Cassandra Cluster), SphinxSE (access the Sphinx daemon) • Indexes: improves search operations • Memory usage: improves data access for speed • Transactions: protects the integrity of your data (Atomic-Consistent-Isolated- Durable - ACID) • Locking level: MyISAM (table locks), InnoDB (row locks), old BDB (page locks) • Data types: Data types may be converted, MEMORY doesn’t support TEXT, etc. • Caching: InnoDB caches data & indexes, MyISAM caches indexes only (relying on OS disk cache for data) • Full-text search capability: MyISAM has this, InnoDB 5.6 got this • GIS: MyISAM & Aria work (R-tree indexes exist), InnoDB 5.7 has this too 42
  • 43. INFORMATION_SCHE MA • Holds metadata (data about the data) on all other databases & tables, exposed as regular tables • Generated on the fly • Has extensions in MariaDB as we expose more data than native MySQL 43
  • 44. PERFORMANCE_SCH EMA • Allows for monitoring execution at a low level • This is a storage engine, monitoring server events (anything that takes time & can be instrumented) • Tables are views or temporary tables that use no on-disk storage 44
  • 45. Transactional vs. non- transactional • Transaction-safe tables (InnoDB) have advantages over non-transaction safe tables (MyISAM): • server crash? Automatic recovery, or a backup +transaction log • ROLLBACK can be executed to ignore changes • Update fails? Changes reverted • Concurrency - tables w/ many update + concurrent reads • Disadvantages in today’s environments (transaction overhead = slower), more disk space requirements, more memory to perform updates don’t seem like they apply any longer 45
  • 46. Indexes • Tree Indexes • B-Trees • B+Trees (InnoDB) • T-Trees (NDB) • Red-black binary trees (MEMORY) • R-Trees (MyISAM for spatial indexes) • Hash Indexes (MEMORY, NDB, InnoDB) • If table fits entirely in memory, fastest way to perform queries is a hash index • InnoDB has an internal adaptive hash index. InnoDB monitors index searches, and if it notices that it will benefit from a hash index, InnoDB automatically builds one. (5.1.24 and greater) 46
  • 47. MyISAM • Pros? • excellent INSERT performance • small footprint • supports full-text search (FTS) • Cons? • no transactions • no foreign key support • Typical uses • logging • auditing • data warehousing 47
  • 48. MyISAM II • In my.cnf, remember to set the key_buffer_size. This is memory*0.40, as MyISAM uses the OS cache for tables • myisam_use_mmap enables MyISAM to use memory mapping (7-40% speed improvement) • key_cache_segments = 1 enables segmented key caches in MariaDB - ~250% improvements, as it mitigates thread contention for key cache lock 48
  • 49. MyISAM segmented key caches • Mitigates thread contention for key cache lock, with notable performance improvements • Key caches divided into different segments, allowing for better key cache concurrency • 1-64 segments 49
  • 50. InnoDB • Maintains its own buffer pool (does aggressive memory caching) • Uses tablespaces (several files on disk, raw disk support) • Typically used for OLTP operations 50
  • 51. ARCHIVE • Store large amounts of data without indexes, in small disk footprint • SELECT and INSERT operations only • Good for data audit use • Uses AZIO (zlib) compression 51
  • 52. FederatedX • Create logical pointers to tables that exist on other MySQL servers; these can then be linked together to form one logical database • A federated table pointing to an InnoDB table on another server, will have transaction support (in 5.1) • Capabilities limited to underlying engine on remote server • CREATE TABLE t1 (...) ENGINE=FEDERATED CONNECTION='mysql://username:pwd@myhost:3306/db_name/ tbl_name • Can also be used for synchronous replication • Federated table on master server pointing to slave; triggers on master table to write all changes to remote table once applied to the master 52
  • 53. Memory • Previously known as HEAP tables • In-memory engine • Hash index used by default (changes in 5.2, enable much better INSERT performance), B-Tree available too • https://mariadb.com/kb/en/performance-of- memory-tables/ 53
  • 54. Aria • Based off the 5.1 code • 1.0 – crash-safe MyISAM, with cacheable row format • 1.5 – concurrent INSERT/SELECT • Soon to be merged into 6.0, then... • 2.0: transactional + ACID compliance • 3.0: high concurrency, online backup • Goal:ACID compliant, MVCC transactional storage engine, based on MyISAM • Target? Data warehousing • Uses big log files (1GB by default) • 8K pages used by default (MyISAM uses 1K pages) • Has group commit (MariaDB 5.2) to speed up inserts 54
  • 55. PBXT (deprecated) • MVCC, transactional,ACID compliant, foreign key support • row-level locking for updates, so maximum concurrency • immediate notification if client processes are deadlocked • write-once, as it uses a log-based architecture (write data to DB without first writing to transaction log) • support for BLOB streaming with Blob Streaming engine 55
  • 56. Storage Engine API • http://dev.mysql.com/tech-resources/ articles/creating-new-storage-engine.html • SHOW PLUGINS; • https://kb.askmonty.org/v/extending-create- table • storage/example/ha_example.cc and storage/example/ha_example.h 56
  • 57. Writing your own • Find the plugin path - show variables like “%plugin%”; +-----------------+-----------------------------------------------+ | Variable_name | Value | +-----------------+-----------------------------------------------+ | plugin_dir | /usr/local/Cellar/mariadb/10.0.15/lib/plugin/ | | plugin_maturity | unknown | +-----------------+-----------------------------------------------+ • note that this is also where you store UDFs • Copy the relevant engine (eg. myengine.so) • INSTALL PLUGIN myengine SONAME 'myengine.so'; • Server registers plugin to mysql.plugin table, and now ENGINE=myengine will work 57
  • 58. Things to think about • Backup is not engine-independent • MyISAM, InnoDB,TokuDB • LVM/ZFS snapshots mitigate this • Different engines have different monitoring options • Mix and match; use summary tables 58
  • 59. Survey of popular OSS tools - what they use • Wordpress (blog): uses default engine, MyISAM is fine • MediaWiki (wiki): prefers InnoDB, except for “searchindex” table, which is MyISAM • http://svn.wikimedia.org/viewvc/mediawiki/trunk/ phase3/maintenance/tables.sql?view=markup • vBulletin (forum): MyISAM • SugarCRM (CRM): MyISAM (with conversion script to InnoDB provided) • Zimbra Collaboration Suite: InnoDB 59
  • 60. Now, let’s focus on MariaDB features 60
  • 61. We start with... • What came in 5.1, 5.2, 5.3, 5.5 (jump around appropriately) • What comes in 10.0 series • I won’t talk about deprecated features like PBXT in-depth, or even the old MariaDB 5.1 pool of threads (5.5 threadpool is better + improvements in 10.1) 61
  • 62. XtraDB • A more performant InnoDB designed to scale on modern hardware • Less checkpointing (smoother), less flushing to disk 62
  • 63. InnoDB notes • SHOW GLOBALVARIABLES LIKE ‘innodb_ver %'; • Important - ship XtraDB and merge with different Percona Server versions • eg. innodb_adaptive_flushing_method - native| estimate|keep_average - where was reflex? • (okay, 5.6 compatibility, innodb_adaptive_flushing eventually) 63
  • 64. InnoDB Fake Changes • InnoDB Fake Changes for replication pre- fetching (for DML operations) • Great for buffer pool warmup • Consider using multi-threaded slaves in 10.2 • https://www.percona.com/doc/percona- server/5.6/management/ innodb_fake_changes.html 64
  • 65. Log archiving • Log archiving (use to create incremental backups with xtrabackup) • When log archiving is enabled, it duplicates all redo log writes in a separate set of files in addition to normal redo log writing, creating new files as necessary. • https://www.percona.com/doc/percona- server/5.6/management/log_archiving.html 65
  • 66. SHOW ENGINE INNODB STATUS • Extended, reorganised • Information about internal hash tables Internal hash tables (constant factor + variable factor) Adaptive hash index 2446944 (2213368 + 233576) Page hash 139112 (buffer pool 0 only) Dictionary cache 788235 (554768 + 233467) File system 829168 (812272 + 16896) Lock system 333592 (332872 + 720) Recovery system 0 (0 + 0) 66
  • 67. Count InnoDB deadlocks • Show deadlocks since the server has started • SHOW GLOBAL STATUS LIKE ‘innodb_deadlocks'; • + SHOW ENGINE INNODB MUTEX; 67
  • 68. Further reading • Multiple Adaptive Hash Search Partitions • https://www.percona.com/doc/percona- server/5.6/scalability/ innodb_adaptive_hash_index_partitions.ht ml • Improved InnoDB I/O Scalability • https://www.percona.com/doc/percona- server/5.6/scalability/innodb_io.html 68
  • 69. Switching between XtraDB & InnoDB mysqld --ignore-builtin-innodb --plugin- load=innodb=ha_innodb.so --plugin_dir=/usr/local/ mysql/lib/mysql/plugin Or in my.cnf [mysqld] ignore-builtin-innodb plugin-load=innodb=ha_innodb.so plugin_dir=/usr/local/mysql/lib/mysql/plugin 69
  • 70. Usernames • Usernames in MariaDB > 5.5.31? 80 character limit (which you have to reload manually) create user 'long12345678901234567890'@'localhost' identified by 'pass'; Query OK, 0 rows affected (0.01 sec) vs ERROR 1470 (HY000): String 'long12345678901234567890' is too long for user name (should be no longer than 16) 70
  • 71. MariaDB 5.5: an opensource threadpool • Modified from 5.1 (libevent based), great for CPU bound loads and short running queries • No minimization of concurrent transactions with dynamic pool size • thread_handling=po ol-of-threads • https://mariadb.com/kb/en/ mariadb/thread-pool-in- mariadb/ 71
  • 72. Improved threadpool • You can limit resources used by threads: thread_pool_max_threads • SHOW GLOBALVARIABLES LIKE '%thread_%'; 72
  • 73. Better for DBAs: async client library • start operation, do work in thread, operation processed, result travels back • use cases: multiple queries against single server (utilize more CPUs); queries against multiple servers (SHOW STATUS on many machines) • https:// kb.askmonty.org/en/ about-non-blocking- operation-in-the- client-library/ • fast node.js driver available: mariasql • https:// kb.askmonty.org/en/ mariasql-for-nodejs/ 73
  • 74. LIMIT ROWS EXAMINED • The purpose of this optimization is to provide the means to terminate the execution of SELECT statements which examine too many rows, and thus use too many resources. •SELECT * from t1, t2 LIMIT 10 ROWS EXAMINED 1000; • https://kb.askmonty.org/ en/limit-rows-examined/ 74
  • 75. SHOW STATUS • SHOW STATUS provides server status information. It is like mysqladmin extended-status. •SHOW STATUS LIKE ‘Key%’; • https://kb.askmonty.org/en/show-status/ • https://kb.askmonty.org/en/server-status-variables/ • MariaDB has opened_views, executed_triggers, executed_events, feature_* as new options 75
  • 76. SQL Error Logging Plugin • Log errors sent to clients in a log file that can be analysed later. Log file can be rotated (recommended) • a MYSQL_AUDIT_PLUGIN install plugin SQL_ERROR_LOG soname 'sql_errlog.so'; 76
  • 77. Audit Plugin • Log server activity - who connects to the server, what queries run, what tables touched - rotating log file or syslogd • MariaDB has extended the audit API, so user filtering is possible • a MYSQL_AUDIT_PLUGIN INSTALL PLUGIN server_audit SONAME ‘server_audit.so’; 77
  • 78. Replication: selective skipping • All changes that are logged as events in the binlog are replicated to all slaves • However, sometimes you want all to be logged to binlog but skipped replication to slaves • @@skip_replication (session only) • replicate_events_marked_for_skip = replicate|filter_on_slave| filter_on_master (dynamic) 78
  • 79. Replication: dynamic variables • The variables replicate_do_*, replicate_ignore_*, and replicate_wild_* have been made dynamic, so they can be changed without requiring a server restart. • https://kb.askmonty.org/en/dynamic- replication-variables/ 79
  • 80. Replication:Annotation of RBR events • MariaDB supports statement & row based replication (RBR) • In RBR, the binlog has no SQL statements, only events are logged (INSERT, DELETE, etc) • Option to include original SQL statement (default OFF) • https://kb.askmonty.org/en/ annotate_rows_log_event/ 80
  • 81. Replication: binlog event checksums • Backport from MySQL 5.6 (in MariaDB 5.3+) • binlog_checksum option • Slaves perform checksums on events received & will stop if there is corruption • https://kb.askmonty.org/en/binlog-event- checksums/ 81
  • 82. Replication: group commit in the binary log •sync_binlog=1, innodb_flush_log_at_trx_commit =1 • https://www.facebook.com/note.php? note_id=10150261692455933 • http://kb.askmonty.org/en/group-commit-for- the-binary-log • SHOW STATUS LIKE 'binlog_%commits'; 82
  • 83. Group commit in MariaDB 5.3 onwards • Do slow part of prepare() in parallel in InnoDB (first fsync(), InnoDB group commit) • Put transaction in queue, decide commit order 83
  • 84. • First in queue runs serial part for all, rest wait • Wait for access to the binlog • Write transactions into binlog, in order, then sync (second fsync()) • Run the fast part of commit() for all transactions in order 84
  • 85. • Finally, run the slow part of commit() in parallel (third fsync(), InnoDB group commit) • Only 2 context switches per thread (one sleep, one wakeup) • Note: MySQL 5.6, MariaDB 10 only does 2 fsyncs/group commit 85
  • 86. Group commit in MariaDB 10 • Remove commit in slow part of InnoDB commit (stage 4) • Reduce cost of crash-safe binlog • A binlog checkpoint is a point in the binlog where no crash recovery is needed before it. In InnoDB you wait for flush + fsync its redo log for commit 86
  • 87. crash-safe binlog • MariaDB 5.5 checkpoints after every commit —> quite expensive! • 5.5/5.6 stalls commits around binlog rotate, waiting for all prepared transactions to commit (since crash recovery can only scan latest binlog file) 87
  • 88. crash-safe binlog 10.0 • 10.0 makes binlog checkpoints asynchronous • A binlog can have no checkpoints at all • Ability to scan multiple binlogs during crash recovery • Remove stalls around binlog rotates 88
  • 89. Extensions to the SE API • prepare() - write prepared trx in parallel w/group commit • prepare_ordered() - called serially, in commit order • commit_ordered() - called serially, in commit order; fast commit to memory • commit() - commit to disk in parallel, 89
  • 90. group commit in 10.1 • Tricky locking issues hard to change without getting deadlocks sometimes • mysql#68251, mysql#68569 • New code? Binlog rotate in background thread (further reducing stalls). Split transactions across binlogs, so big transactions do not lead to big binlog files • Enhanced semi-sync replication (wait for slave before commit on the master rather than after commit) 90
  • 91. Replication: START TRANSACTION WITH CONSISTENT SNAPSHOT • Works with the binlog, possible to obtain the binlog position corresponding to a transactional snapshot of the database without blocking any other queries. • by-product of group commit in the binlog to view commit ordering • Used by the command mysqldump--single-transaction --master-data to do a fully non-blocking backup • Works consistently between transactions involving more than one storage engine • https://kb.askmonty.org/en/enhancements-for-start-transaction- with-consistent/ 91
  • 92. GIS support! • MySQL has OpenGIS SFS (Simple feature access, SQL access method) • Now, SQL with full geometry types • ST_ prefix (incl. ST_RELATE, ST_BOUNDARY, etc.) • MyISAM,Aria for SPATIAL & non-spatial indexes • When 5.7-InnoDB is merged, it will get support too 92
  • 93. GIS II • Spatial reference systems support (REF_SYSTEM_ID) can be specified as a column attribute • INFORMATION_SCHEMA.GEOMETRY_COLUMN S for queries of references • Use Osmosis, you can load all OpenStreetMap data into MariaDB now • https://mariadb.com/kb/en/gis-features-in-533/ • https://mariadb.com/kb/en/openstreetmap-dataset/ 93
  • 94. Progress reporting • ALTER TABLE & LOAD DATA INFILE MariaDB [mail]> alter table mail engine = maria; Stage: 1 of 2 'copy to tmp table' 17.55% of stage done MariaDB [mail]> select id, user, db, command, state, -> time_ms, progress from information_schema.processlist; +---------+-------------------+-----------+----------+ | command | state | time_ms | progress | +---------+-------------------+-----------+----------+ | Query | copy to tmp table | 23407.131 | 17.551 | +---------+-------------------+-----------+----------+ 1 row in set (0.47 sec) 94
  • 95. TIME_MS in I_S.PROCESSLIST • Extra column 'TIME_MS' has been added to the INFORMATION_SCHEMA.PROCESSLIST table • Units of milliseconds with microsecond precision (the unit and precision of the 'TIME' column is one second). 95
  • 96. 5.7 I_S.PROCESSLIST +---------+---------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +---------+---------------------+------+-----+---------+-------+ | ID | bigint(21) unsigned | NO | | 0 | | | USER | varchar(32) | NO | | | | | HOST | varchar(64) | NO | | | | | DB | varchar(64) | YES | | NULL | | | COMMAND | varchar(16) | NO | | | | | TIME | int(7) | NO | | 0 | | | STATE | varchar(64) | YES | | NULL | | | INFO | longtext | YES | | NULL | | +---------+---------------------+------+-----+---------+-------+ 8 rows in set (0.00 sec) 96
  • 97. 10.1 I_S.PROCESSLIST | TIME_MS | decimal(22,3) | NO | | 0.000 | | | STAGE | tinyint(2) | NO | | 0 | | | MAX_STAGE | tinyint(2) | NO | | 0 | | | PROGRESS | decimal(7,3) | NO | | 0.000 | | | MEMORY_USED | int(7) | NO | | 0 | | | EXAMINED_ROWS | int(7) | NO | | 0 | | | QUERY_ID | bigint(4) | NO | | 0 | | | INFO_BINARY | blob | YES | | NULL | | +---------------+---------------+------+-----+---------+-------+ 16 rows in set (0.00 sec) 97
  • 98. New KILL syntax • HARD | SOFT & USER USERNAME are MariaDB-specific (5.3.2) • KILL QUERY ID query_id (10.0.5) - kill by query id, rather than thread id • SOFT ensures things that may leave a table in an inconsistent state aren’t interrupted (like REPAIR or INDEX creation for MyISAM or Aria) KILL [HARD | SOFT] [CONNECTION | QUERY] [thread_id | USER user_name] 98
  • 99. Statistics • Understand server activity better to understand database loads •SET GLOBAL userstat=1; •SHOW CLIENT_STATISTICS; SHOW USER_STATISTICS; • # of connections, CPU usage, bytes received/sent, row statistics •SHOW INDEX_STATISTICS; SHOW TABLE_STATISTICS; • # rows read, changed, indexes • INFORMATION_SCHEMA.PROCESSLIST has MEMORY_USAGE, EXAMINED_ROWS (similar with SHOW STATUS output) 99 MariaDB 10.0+
  • 101. The old days • Download MySQL, including sources • Download SphinxSE for compiling • Download Sphinx to compile with MySQL support • Documented: http://www.howtoforge.com/ sphinx-as-mysql-storage-engine-sphinxse 101
  • 102. Today • Install sphinx from your distribution • Install MariaDB 5.5 from your distribution or from http://mariadb.org/ • Get started! 102
  • 103. Getting started mysql> INSTALL PLUGIN sphinx SONAME 'ha_sphinx.so'; Query OK, 0 rows affected (0.01 sec) 103
  • 105. What is SphinxSE? • SphinxSE is just the storage engine that still depends on the Sphinx daemon • It doesn’t store any data itself • Its just a built-in client to allow MariaDB to talk to Sphinx searchd, run queries, obtain results • Indexing, searching is performed on Sphinx 105
  • 106. Configure sphinx! • /usr/local/sphinx/sphinx.conf • Source (multiple, include mysql, with connection info) • Setup indexer (esp. if its on localhost) - mem_limit, max_iops, max_iosize • Setup searchd (where to listen to, query log, etc.) 106
  • 107. Use case scenarios • Already have an existing application that makes use of full-text-search in MyISAM? Porting should be easier • Have a programming language without a native API for Sphinx? Surely there’s a connector for MariaDB ;-) 107
  • 108. Use case scenarios • Results from Sphinx itself almost always require additional work involving MariaDB • Say to pull out text column that Sphinx index doesn’t store • JOIN with another table (using a different engine) 108
  • 109. An example CREATE TABLE t1 ( id INTEGER UNSIGNED NOT NULL, weight INTEGER NOT NULL, query VARCHAR(3072) NOT NULL, group_id INTEGER, INDEX(query) ) ENGINE=SPHINX CONNECTION="sphinx://localhost:9312/test"; SELECT * FROM t1 WHERE query='test it;mode=any'; 109
  • 110. Sphinx search tables • 1st column: INTEGER UNSIGNED or BIGINT (document ID) • 2nd column: match weight • 3rd column: VARCHAR or TEXT (your query) • Query column needs indexing, no other column needs to be 110
  • 111. What actually happens • SELECT passes a Sphinx query as the query column in the WHERE clause • searchd returns the results • SphinxSE translates and returns the results to MariaDB 111
  • 112. SHOW ENGINE SPHINX STATUS • Per-query & per-word statistics that searchd returns are accessible via SHOW STATUS mysql> SHOW ENGINE SPHINX STATUS; +--------+-------+-------------------------------------------------+ | Type | Name | Status | +--------+-------+-------------------------------------------------+ | SPHINX | stats | total: 25, total found: 25, time: 126, words: 2 | | SPHINX | words | sphinx:591:1256 soft:11076:15945 | +--------+-------+-------------------------------------------------+ 2 rows in set (0.00 sec) 112
  • 113. What queries are supported? • Most of the Sphinx API is exposed to SphinxSE • query, mode, sort, offset, limit, index, minid, maxid, weights, filter, !filter, range, !range, maxmatches, groupby, groupsort, indexweights, comment, select • Sphinx search modes can also be supported via _sph attributes • obtain value of @groupby? use ‘_sph_groupby’ 113
  • 114. Efficiency • Allow Sphinx to perform sorting, filtering, and slicing of result set • ... as opposed to using WHERE, ORDER BY, LIMIT clauses on MariaDB • Why? • Sphinx optimises and performs better on these tasks • Less data packed by searchd, and transferred and unpacked by SphinxSE 114
  • 115. JOINs • Perform JOINs on a SphinxSE search table using tables from other engines SELECT content, date_added FROM test.documents docs -> JOIN t1 ON (docs.id=t1.id) -> WHERE query="one document;mode=any"; +-------------------------------------+---------------------+ | content | docdate | +-------------------------------------+---------------------+ | this is my test document number two | 2006-06-17 14:04:28 | | this is my test document number one | 2006-06-17 14:04:28 | +-------------------------------------+---------------------+ 2 rows in set (0.00 sec) 115
  • 116. Statistics • Understand server activity better to understand database loads •SET GLOBAL userstat=1; •SHOW CLIENT_STATISTICS; SHOW USER_STATISTICS; • # of connections, CPU usage, bytes received/sent, row statistics •SHOW INDEX_STATISTICS; SHOW TABLE_STATISTICS; • # rows read, changed, indexes • INFORMATION_SCHEMA.PROCESSLIST has MEMORY_USAGE, EXAMINED_ROWS (similar with SHOW STATUS output) 116 MariaDB 10.0+
  • 117. Table Elimination • Resolve a query without accessing some tables query refers to • Great for querying highly normalised data • Basis of “anchor modelling” • http://www.anchormodeling.com/ • SQL Server 2005/2008, Oracle 11g have it 117
  • 118. Virtual columns • A column in a table that has its value automatically calculated either with a pre- calculated/deterministic expression or values of other fields in the table • PERSISTENT (computed when data is inserted or stored in a table) orVIRTUAL (like aVIEW) • Similar to MS SQL or Oracle • https://kb.askmonty.org/en/virtual-columns/ 118
  • 119. Optimizer enchancements • Join additions • block nested loop joins for outer-joins, block hash joins, Batched Key Access (BKA) • Optimization for derived tables & views • mergeable derived tables processed likeVIEWs + optimizer creates indexes over materialized derived tables • Disk access optimization • Index Condition Pushdown (ICP), Multi-Range Read (MRR) 119
  • 120. Subquery optimizations • Semi-join optimization, materialization for non- correlated IN queries, subquery cache • Goodbye rewriting as JOINs or separate queries DBT-3, 60M rows, 29GB XtraDB 120
  • 121. 121
  • 122. EXPLAIN • INSTANT EXPLAIN • EXPLAIN Analyzer - https://mariadb.org/ explain_analyzer/ analyze/ • Optimizer feature comparison matrix: https://kb.askmonty.org/ en/optimizer-feature- comparison-matrix/ • optimizer_switch meanings: https:// mariadb.com/kb/en/ mariadb-53- optimizer_switch/ 122
  • 124. Extended keys • Default is extended_keys=on • Extended Keys, introduced in MariaDB 5.5, is an optimization which makes use of existing components of InnoDB/XtraDB keys to generate more efficient execution plans. Using these components in many cases allows the server to generate execution plans which employ index- only look-ups. • https://mariadb.com/kb/en/extended-keys/ 124
  • 125. NoSQL: HandlerSocket • Comes with HandlerSocket • direct access to XtraDB/InnoDB for CRUD operations • INSTALL PLUGIN handlersocket SONAME 'handlersocket.so'; • This allows applications to communicate more directly with MySQL storage engines, without the overhead associated with using SQL. This includes operations such as parsing and optimising queries, as well as table handling operations (opening, locking, unlocking, closing). 125
  • 126. NoSQL: dynamic columns • Allows you to create virtual columns with dynamic content for each row in table • Basically a BLOB with handling functions • Store different attributes for each item (like a web store). Hard to do relationally • In MariaDB 10.0: name support (instead of referring to columns by numbers, name it), convert all dynamic column content to JSON array, interface with Cassandra • INSERT INTO tbl SET dyncol_blob=COLUMN_CREATE("column_name", "value"); • https://kb.askmonty.org/en/dynamic-columns/ 126
  • 127. Pluggable authentication • MariaDB & MySQL now uses password authentication via pluggable auth • Unix sockets • PAM 127
  • 128. auth_socket • Authenticates against the Unix socket file • Uses so_peercred socket option to obtain information about user running client •CREATE USER ‘byte’@‘localhost’ IDENTIFIED with auth_socket; • Refuses connection of any other user but byte from connecting 128
  • 129. PAM Authentication • MySQL PAM • Percona PAM (auth_pam & auth_pam_compat) • MariaDB PAM (pam) 129
  • 130. Let’s get somethings out of the way • PAM = Pluggable Authentication Module • Use pam_ldap to to authenticate credentials against LDAP server — configure /etc/pam_ldap.conf (you also obviously need /etc/ldap.conf) • Simplest way is of course /etc/shadow auth 130
  • 131. MariaDB INSTALL SONAME ‘auth_pam’; CREATE USER byte IDENTIFIED via pam USING ‘mariadb’; Edit /etc/pam.d/mariadb: auth required pam_unix.so account required pam_unix.so 131
  • 132. For MySQL compatibility • Just use —pam-use-cleartext- plugin for MySQL to use mysql_cleartext_password instead of dialog plugin 132
  • 133. Possible errors • Connectors don’t support it: • Client does not support authentication protocol requested by server; consider upgrading MySQL client. • You really have to re-compile connector using libmysqlclient to have said support 133
  • 135. Why MariaDB 10.0? • The 5.5 merge took about a year (!) • We (MariaDB-5.5) have over 1.5 million lines of extra code with a ~61MB diff • We didn’t want to repeat this for 5.6 • Also, MySQL 5.6 has a lot of re-factoring, thus loosing commit history 135
  • 136. In a nutshell • Built on MariaDB 5.5 • Backported features from MySQL 5.6 • New features 136
  • 137. What about tools? • SELECTVERSION() will return 10.0.1-MariaDB • Oops, we found a bug in MySQL: https:// mariadb.atlassian.net/ browse/MDEV-4088 & http://bugs.mysql.com/ bug.php?id=68187 • Still deciding: • Use 9.0 for a name • Lie to clients (no) • Disallow replication (no) • Use handshake packet 5.5.30-mysql-10.0.2- MariaDB without affectingVERSION() / @@global.version 137
  • 138. What about tools II? • Tools really should recognise MariaDB version as there are already many new features that MySQL doesn’t have • eg. HeidiSQL supports virtual columns (http://www.heidisql.com/forum.php? t=8671) 138
  • 139. Backported features (i.e. these are from MySQL 5.6) 139
  • 140. InnoDB & XtraDB • MariaDB 10.0 ships InnoDB from MySQL 5.6 • MariaDB 10 ships Percona XtraDB as default • minimal performance improvements expected, just functionality & features • bitmap changed page tracking so xtrabackup can do incremental backups without scanning all InnoDB files • SHOW GLOBALVARIABLES LIKE 'innodb_ver%'; 140
  • 141. More from MySQL 5.6 • PERFORMANCE_SCHEMA • InnoDB read-only transactions (TRANSACTION READ ONLY) • Optimizer: • EXISTS-TO-IN optimization • ORDER BY...LIMIT optimization (show only few rows of a result set) • CURRENT_TIMESTAMP as DEFAULT for DATETIME columns (this is a re-implementation in MariaDB) 141
  • 142. In MariaDB 10.0 the new stuff! 142
  • 143. MariaDB 10 replication • Global Transaction ID • have complex replication topologies; simple failover & slave promotion • doesn’t require restarts! • new slave provisioning: SET GLOBAL GTID_SLAVE_POS = BINLOG_GTID_POS("masterbin.00045", 600); CHANGE MASTER TO master_host="192.168.2.4", master_use_gtid=slave_pos; START SLAVE; • turning on GTID for slaves: STOP SLAVE
 CHANGE MASTER TO master_use_gtid=current_pos; START SLAVE; • change masters: STOP SLAVE
 CHANGE MASTER TO master_host="10.2.3.5"; START SLAVE; • Crash-safe slaves - GTID position stored in InnoDB table 143
  • 144. Why different GTID compared to 5.6? • MySQL 5.6 GTID does not support multi- source replication • Supports —log-slave-updates=0 for efficiency • Enabled by default 144
  • 145. Binlog (size matters!) • Example query: INSERT INTO t1VALUES (10,“foo”); • MySQL 5.6… 265 bytes • MariaDB 10.0… 161 bytes 145
  • 146. Crash-safe slave (w/ InnoDB DML) • Replace non-transactional file relay_log.info with transactional mysql.rpl_slave_state • Changes to rpl_slave_state are transactionally recovered after crash along with user data. 146
  • 147. Replication domains • Keep central concept that replication is just applying events in-order from a serial binlog stream. • Allow multi-source replication with multiple active masters • Let’s the DBA configure multiple independent binlog streams (one per active master: mysqld --git-domain-id=#) • Events within one stream are ordered the same across entire replication topology • Events between different streams can be in different order on different servers • Binlog position is one ID per replication domain 147
  • 148. Parallel replication • Multi-source replication from different masters executed in parallel • Queries from different domains are executed in parallel • Queries that are run in parallel on the master are run in parallel on the slave (based on group commit). • Transactions modifying the same table can be updated in parallel on the slave! • Supports both statement based and row based replication. 148
  • 149. Multi-source replication • Work from Taobao • Many users partition data across many masters... now you can replicate many masters to a single slave • Great for analytical queries, complete backups, etc. • @@default_master_connection contains current connection name (used if connection name is not given) • All master/slave commands take a connection name now (like CHANGE MASTER “connection_name”, SHOW SLAVE “connection_name” STATUS, etc.) • https://kb.askmonty.org/en/multi-source-replication/ 149
  • 150. Only in 10.0 • SHOW EXPLAIN for <thread_id> (https:// mariadb.com/kb/en/show- explain/) gets the query plan of a running statement • EXPLAIN ANALYZE • Faster ALTER TABLE with unique keys for Aria & MyISAM • Segmented MyISAM keycaches (up to 64) since MariaDB 5.2 exist too • Per-thread memory usage (Taobao) • I_S.PROCESSLIST has MEMORY_USAGE & EXAMINED_ROWS • SHOW STATUS has memory usage too 150
  • 151. SHUTDOWN • shuts down the server; requires GRANTs similar to mysqladmin shutdown command • you can create an event that does a SHUTDOWN of the server as an example… • https://mariadb.com/kb/en/shutdown/ 151
  • 153. CassandraSE • Integration with NoSQL/Big Data DB,Apache Cassandra cluster, seen as a storage engine to MariaDB • Combine (join) data between Cassandra & MariaDB • Write to Cassandra from SQL (SELECT, INSERT, UPDATE, DELETE) • CQL is great, but the goal is for you to just work with SQL, not switch between CQL & SQL • Data is mapped: rowkey, static columns, dynamic columns • super columns aren’t supported • No 1-1 direct map for data types (ref: https://kb.askmonty.org/en/ cassandra-storage-engine/) 153
  • 154. TokuDB • Opensource - separate MariaDB 5.5+TokuDB/ integrated in 10.0.5 • Improved insert (10-20x faster) & query speed, compression (up to 90% space reduction), replication performance and online schema flexibility • Uses Fractal Tree Indexes instead of B-Tree • Tests & builds of TokuDB on multiple platforms (think greater distribution) 154
  • 155. CONNECT • CONNECT will speak XML or even grab data over an ODBC connection • You can CONNECT to Oracle (via ODBC), join results from Cassandra (via CassandraSE) and have all your results sit in InnoDB • Turn on engine condition pushdown (10.1 not required) 155
  • 156. SPIDER • Spider has built-in sharding features • Partitioning & XA transaction capable • Different MariaDB instance tables handled like it is the same instance 156
  • 157. Engine-independent persistent statistics • InnoDB has persistent statistics in MySQL 5.6; we have an engine-independent version • These statistics aren’t limited by the SE API, and are used by query optimizer to choose best execution plan for each statement • Statistics collected for non-indexed columns too (unlike InnoDB’s) 157
  • 158. MariaDB 10.0.2 • Support for atomic writes on FusionIO DirectFS • Optimizer collects & can use histogram-based statistics for non-indexed columns • Better table discovery, so FederatedX has assisted discovery, Sequence engine (creates ascending/descending sequences, useful in joins) • SHOW PLUGINS SONAME; 158
  • 159. MariaDB 10.0.4 • SPIDER storage engine for database sharding merged • Audit plugin • complete PERFORMANCE_SCHEMA • INFORMATION_SCHEMA with upstream defaults too • Online ALTER for InnoDB and thread information for in-place operations 159
  • 160. MariaDB 10.0.5 • Parallel replication - https://mariadb.com/ kb/en/parallel-replication/ • automatically detect independent transactions, parallel within same table, adapts to master load, and preserves commit ordering • EXPLAIN in the slow query log 160
  • 161. MariaDB 10.0.6 • Serious incompatibility and data corruption of DATETIME and DATE types due to get_innobase_type_from_mysql_type refactor combined with InnoDB Online DDL • https://mariadb.atlassian.net/browse/ MDEV-5248 • Fixed upgrades from MySQL 5.1 -> MariaDB • Parallel replication improvements 161
  • 162. MariaDB 10.0.7 • Mostly bug fixes, to stabilise the code • XtraDB 5.6 merged (InnoDB still default) • OQGraph v3 - stores data on disk, persistent, larger graph support • INFORMATION_SCHEMA.METADATA_L OCK_INFO plugin to see active metadata locks 162
  • 163. PCRE Regular Expressions • Powerful REGEXP/RLIKE operator • New operators: • REGEXP_REPLACE(sub,pattern,replace) • REGEXP_INSTR(sub,pattern) • REGEXP_SUBSTR(sub,pattern) • Works with multi-byte character sets that MariaDB supports, including East-Asian sets 163
  • 164. Roles • Bundles users together, with similar privileges - follows the SQL standard CREATE ROLE audit_bean_counters; GRANT SELECT ON accounts.* to audit_bean_counters; GRANT audit_bean_counters to ceo; 164
  • 165. MariaDB 10.0.9 (RC) • InnoDB 5.6.15 (XtraDB default; InnoDB plugin) • Extended keys optimization on by default • MASTER_GTID_WAIT( ) + @@last_gtid • TIME casted to DATETIME, date is CURRENT_DATE not 0000-00-00 - SQL standards compliant • @@old_mode=ZER O_DATE_TIME_CAS T 165
  • 166. MariaDB 10.0.10 (GA) • audit plugin now ships • XtraDB performance fixed incorrect calculation of flushed pages • TokuDB compression is now TOKUDB_ZLIB • Engine independent table statistics improved 166
  • 168. Galera Cluster integrated • Full integration of Galera Cluster 3.9 (will be 4) into MariaDB 10.1 — it won’t be a separate download • no lost transactions • optimisations for WAN replication • non-blocking DDL • no limits on transaction size •Server version: 10.1.3-MariaDB-wsrep MariaDB Server, wsrep_25.10.r4144 • Granular monitoring in INFORMATION_SCHEMA — WSREP_MEMBERSHIP, WSREP_STATUS 168
  • 169. Encryption • Encryption: tablespace and table level encryption with support for rolling keys using the AES algorithm • table encryption — PAGE_ENCRYPTION=1 • tablespace encryption — encrypts everything including log files • New file_key_management_filename, file_key_management_filekey, file_key_management_encryption_algorithm • Well documented — https://mariadb.com/kb/en/mariadb/ data-at-rest-encryption/ 169
  • 170. Encryption II • The key file contains encryption keys identifiers (32-bit numbers) and hex- encoded encryption keys (128-256 bit keys), separated by a semicolon. • don’t forget to create keys! • eg. openssl enc -aes-256-cbc - md sha1 -k secret -in keys.txt -out keys.enc 170
  • 171. my.cnf config [mysqld] plugin-load-add=file_key_management.so file-key-management file-key-management-filename = /home/mdb/keys.enc innodb-encrypt-tables innodb-encrypt-log innodb-encryption-threads=4 aria-encrypt-tables=1 # PAGE row format encrypt-tmp-disk-tables=1 # this is for Aria 171
  • 172. Encryption III CREATE TABLE customer ( customer_id bigint not null primary key, customer_name varchar(80), customer_creditcard varchar(20)) ENGINE=InnoDB page_encryption=1 page_encryption_key=1; 172
  • 173. Encryption IV • Tablespace encryption (Google) • again, you need to pick an encryption algorithm • specify what to encrypt: innodb-encrypt-tables, aria, aria-encrypt-tables, encrypt- tmp-disk-tables, innodb-encrypt-log • don’t forget key rotation: •innodb-encryption-threads=4 •innodb-encryption-rotate-key- age=1800 173
  • 174. EncryptionV • we also have tablespace scrubbing • background process that regularly scans through the tables and upgrades the encryption keys • scrubbing works for tablespaces and logs • —encrypt-tmp-files • —encrypt-binlog 174
  • 175. EncryptionVI •/etc/my.cnf.d/enable_encryption.preset • Consider using Eperi Gateway for Databases • MariaDB Enterprise has a plugin for Amazon Key Management Server (KMS) • mysqlbinlog has no way to read (i.e. decrypt) an encrypted binlog • This does not work with MariaDB Galera Cluster yet (gcache is not encrypted yet), and also xtrabackup needs additional work (i.e. if you encrypt the redo log) 175
  • 176. Optimistic parallel replication • Before, transactions committed in parallel on the master could be run in parallel • Now, more than one transaction will be considered to be run in parallel giving another performance boost in master-to-slave replication • We have to check if this only will work with a 10.1 master • Isn’t fully pushed (or documented) yet — see: https://mariadb.atlassian.net/browse/MDEV-6676 176
  • 177. Threadpool • thread_pool_high_prio_mode • thread_pool_high_prio_tickets • MDEV-5533 • This brings in improvements made in Percona Server to the threadpool 177
  • 178. InnoDB improvements • Multi-threaded flush (also in 5.7, different implementation) • Page compression (optimised for Flash, SSD, FusionIO) • 64KB pages in InnoDB (old limit = 16KB). • Defragementation (FB, backported by DaumKakao) • Forced primary key • If option is true, create table without primary key or unique key where all keyparts are NOT NULL is not accepted. Instead an error message is printed. 178
  • 179. InnoDB WebScaleSQL • MDEV-6936: Buffer pool list scan optimisation • MDEV-6929: Port Facebook Prefix Index Queries Optimization • MDEV-6932: Enable Lazy Flushing • MDEV-6931: Page cleaner should do LRU flushing regardless of server activity • fixes mysql#71988, mysql#70500 •  DB-746 merge clustering key is covering key for mariadb 10 (TokuDB) • MDEV-6933: Spurious lock_wait_timeout_thread wakeup in lock_wait_suspend_thread() • fixes mysql#72123 179
  • 180. Per query variables • Long history (http://www.bytebot.net/blog/ archives/2014/05/04/per-query-variable- settings-in-mysqlpercona- serverwebscalesql) •SET STATEMENT max_statement_time=1000 FOR SELECT name FROM name ORDER BY name; 180
  • 181. Statement timeouts • from Twitter patch; re-written by monty • MAX_STATEMENT_TIME to abort long running queries • We call it “query timeouts” + have a different syntax • https://mariadb.atlassian.net/browse/ MDEV-4427 181
  • 182. Optimiser enhancements • UNION ALL without temporary tables (5.7) • Improve ORDER BY in optimiser • Mostly there is EXPLAIN JSON (like 5.6)* • EXPLAIN ANALYZE with FORMAT=JSON • includes data from the query execution itself — this is MariaDB only • https://mariadb.com/kb/en/mariadb/analyze- formatjson-examples/ 182
  • 183. EXPLAIN ANALYZE MariaDB [information_schema]> explain format=json select * from all_pluginsG *************************** 1. row *************************** EXPLAIN: { "query_block": { "select_id": 1, "table": { "table_name": "all_plugins", "access_type": "ALL" } } } 1 row in set (0.01 sec) 183
  • 184. WebScaleSQL • WebScaleSQL improvements • https://mariadb.atlassian.net/browse/ MDEV-6039 • Lots of running thru AddressSanitizer (ASan) • Many of these also get backported to 10.0.13 184
  • 185. Passwords • Password validation plugin exists now • https://mariadb.com/kb/en/mariadb/development/mariadb- internals-documentation/password-validation/ • simple_password_check password validation plugin • can enforce a minimum password length and guarantee that a password contains at least a specified number of uppercase and lowercase letters, digits, and punctuation characters. • cracklib_password_check password validation plugin • Allows passwords that are strong enough to pass CrackLib test.This is the same test that pam_cracklib.so does 185
  • 186. Audit plugin improvements • Monitor access, locate errors, etc. • Connection — connect/disconnect/failed; Query — DDL/DML+TCL/DCL; Object — Database/Tables • Passwords in 1.2 replaced by a placeholder (filtered, i.e. not in audit log) 186
  • 187. CONNECT • CONNECT having full JSON/BSON support • Can read filename.json files with ease • Writing — INSERT, UPDATE, DELETE is supported — however, if you have added/ modified values for objects or arrays, there can be complications (similar like the XML type object issue) • Works with Sveta’s JSON UDFs as well 187
  • 188. Other bits • Slaves can execute triggers now • Dump thread enhancements (remove binlog lock LOCK_log) from 5.7 included (Google) • CREATE or REPLACE for most database objects minus indexes • SET DEFAULT ROLE (there is a default role now for current user) 188
  • 189. Other bits • FRM files are now not created for temporary tables • INFORMATION_SCHEMA.SYSTEM_VARIABLES - information for system variables • Compiled with security hardening options (fortify source - https://mariadb.atlassian.net/browse/ MDEV-5730) • @@sql_log_slow can now be controlled on a session basis (not just globally) 189
  • 190. GIS • Full compliance for the OGC standards around GIS. • yes, we are missing a few functions, but its likely to improve • MDEV-4045 Missing OGC Spatial functions. • MDEV-60 Support for Spatial Reference systems for the GIS data. • MDEV-12 OpenGIS: create required tables: GeometryColumns, related views. • Speaking shortly, the MariaDB GIS part is now OpenGIS compliant, and passes all the OpenGIS conformance tests 190
  • 191. Kerberos/GSSAPI • Every participant in authenticated communication is known as a ‘principal’ (w/unique name) • Principals belong to administrative groups called realms. Kerberos Distribution Centre maintains a database of principal in realm + associated secret keys • Client requests a ticket from KDC for access to a specific asset. KDC uses the client’s secret and the server’s secret to construct the ticket which allows the client and server to mutually authenticate each other, while keeping the secrets hidden. 191
  • 192. MariaDB Kerberos plugin • User principals: <username>@<KERBEROS REALM> •CREATE USER 'byte' IDENTIFIED VIA kerberos AS ‘byte/mariadb@lp'; • so that is <username>/ <instance>@<KERBEROS REALM> • Store Service Principal Name (SPN) is an option in a config file 192
  • 193. Works where? • GSSAPI-based Kerberos widely used & supported on Linux • Windows supports SSPI authentication and the plugin supports it • Comes with MariaDB Server 10.1 193
  • 194. Show list of compiled- in locales • INSTALL SONAME 'locales'; SELECT * FROM INFORMATION_SCHEMA.LOCALES; +-----+-------+-------------------------------------+----------------------- +---------------------+---------------+--------------+------------------------+ | ID | NAME | DESCRIPTION | MAX_MONTH_NAME_LENGTH | MAX_DAY_NAME_LENGTH | DECIMAL_POINT | THOUSAND_SEP | ERROR_MESSAGE_LANGUAGE | +-----+-------+-------------------------------------+----------------------- +---------------------+---------------+--------------+------------------------+ | 0 | en_US | English - United States | 9 | 9 | . | , | english | | 1 | en_GB | English - United Kingdom | 9 | 9 | . | , | english | | 2 | ja_JP | Japanese - Japan | 3 | 3 | . | , | japanese | 194
  • 195. Still use the query cache? • Show the contents of the query cache • Querying the table acquires the QC lock, so lock waits for queries using/expiring QC • INSTALL PLUGIN query_cache_info SONAME ‘query_cache_info'; • select statement_schema, statement_text, result_blocks_count, • result_blocks_size from information_schema.query_cache_info; 195
  • 196. Query response time • (range_base ^ n; range_base ^ (n+1)] • INSTALL SONAME ‘query_response_time'; • SHOW QUERY_RESPONSE_TIME; • https://www.percona.com/doc/percona- server/5.6/diagnostics/ response_time_distribution.html 196
  • 197. Compatibility • Temporary tables are stored in Aria but now there is a —default-tmp-storage-engine option • engine_condition_pushdown flag removed (its always on for engines that support it) • --mysql56-temporal-format option to use the MySQL-5.6 low level formats to store TIME, DATETIME and TIMESTAMP types • PERFORMANCE_SCHEMA disabled by default like in 10.0 197
  • 198. Caveats (for 100% compatibility) • GTID implemented differently from 5.6 • InnoDB memcached • Optimizer trace • mysqlbinlog streaming server • Time-delayed replication 198
  • 199. Looking forward to MariaDB Server 10.2 • mysqlbinlog streaming server backup • Window functions • CREATE USER for limiting resource usage • Virtual column improvements • EXPLAIN JSON gets better • Common Table Expressions 199
  • 200. Support • Five years from every release • MariaDB 5.5 in Red Hat Enterprise Linux 7 • MariaDB 10 in SUSE Enterprise Linux 12 200
  • 201. Benchmarks • “Lies, damned lies, and statistics” - Mark Twain • http://blog.mariadb.org/sysbench-oltp- mysql-5-6-vs-mariadb-10-0/ • http://dimitrik.free.fr/blog/archives/2013/02/ mysql-performance-mysql-56-vs-mysql-55- vs-mariadb-55.html • One thing is clear: there needs to be more benchmarking done 201
  • 202. MariaDB deployed “MariaDB had these same bugs that we ran into with MySQL. However the big difference was that when we reported these bugs, they were quickly resolved within 48 hours!” -- Dreas van Donselaar, Chief Technology Officer, SpamExperts B.V. after migrating over 300 servers from MySQL 5.0 to MariaDB 5.1. “Migrating from MySQL 5.1 to MariaDB 5.2 was as simple as removing MySQL RPMs and installing the MariaDB packages, then running mysql_upgrade.” - Panayot Belchev, proprietor, Host Bulgaria on providing MariaDB to over 7,000 of their web hosting customers. “We made the switch on Saturday -- and we’re seeing benefits already -- our daily optimization time is down from 24 minutes to just 4 minutes” -- Ali Watters, CEO, travelblog.org happy users: pap.fr, Paybox Services, OLX, Jelastic, Web of Trust,Wikipedia, Craigslist, etc. “@nginxorg & @mariadb have helped me save $12000/year in infrastructure cost. I love it! Do more with less!” - Ewdison Then, CEO, Slashgear We upgraded the support.mozilla.org databases from Percona 5.1 to MariaDB 5.5. One of the engineers and I had a conversation where he mentioned that “one of our worst performing views on SUMO is doing waaaayyy better with the upgraded databases”, that it “seems more stable” and that “I stopped receiving ‘MySQL went away or disconnected emails’ which came in once in a while.” - Sheeri Cabral, Mozilla IT 202
  • 203. Resources • http://mariadb.org/ • https://mariadb.com/kb/en/ • http://planet.mysql.com/ • http://planetmariadb.org/ 203
  • 204. Books! 1. MariaDB Crash Course, Ben Forta (September 2011) 2. Getting Started with MariaDB, Daniel Bartholomew (October 2013) 3. MariaDB Cookbook, Daniel Bartholomew (March 2014) 4. Real MariaDB, Matt Lee (April 2014) 5. Building a Web Application with PHP & MariaDB:A Reference Guide, Sai Srinivas Sriparasa (June 2014) 6. MariaDB: Beginners Guide, Rodrigo Ribeiro (August 2014) 7. Mastering MariaDB, Federico Razzioli (September 2014) 8. MariaDB High Performance, Pierre Mavro (September 2014) 9. Learning MySQL & MariaDB, Russell Dyer (April 2015) 204
  • 206. Q&A colin.charles@percona.com | byte@bytebot.net slides: slideshare.net/bytebot http://bytebot.net/blog/ | @bytebot on twitter http://www.percona.com/ 206