SlideShare a Scribd company logo
<Insert Picture Here>




Making MySQL Administration a Breeze
A look into a MySQL DBA's toolchest
Lenz Grimmer
MySQL Community Relations Manager
The preceding is intended to outline our general product
direction. It is intended for information purposes only, and
may not be incorporated into any contract. It is not a
commitment to deliver any material, code, or functionality,
and should not be relied upon in making purchasing
decisions.
The development, release, and timing of any features or
functionality described for Oracle’s products remains at
the sole discretion of Oracle.
Overview
• Tools for Linux/Unix only
• Toolkits (script collections) and individual tools with
  a MySQL focus
• Not covering generic base OS tools like vmstat,
  iostat or top
• Open Source Software
Maatkit
• http://maatkit.org/
• Perl script collection
• >25 tools
• All tools are standalone
• Minimal dependencies
• Docs embedded in the tools
• Exhaustive test suite
Openark kit
• http://code.openark.org/forge/openark-kit/
• Python script collection
• 10 tools
• BSD License
• Written by Shlomi Noach
Kontrollkit
• http://kontrollsoft.com/software-kontrollkit
• A collection of 13 scripts for making your daily
  MySQL DBA responsibilities easier
• Perl, Python, Shell
• Formerly known as Monolith Toolkit
• Maintained by Matt Reid (Kontrollbase)
Hack MySQL Kit (hmk)
• http://hackmysql.com/
• 4 tools (C, Perl)
   – mysqlreport - Make easy-to-read MySQL
     status reports.
   – mysqlsla - Simple, lightweight MySQL log
     parsing.
   – mysqlidxchx - Checks tables for unused
     indexes.
   – mysqlsniffer - MySQL protocol sniffer.
• GPL
• Written by Daniel Nichter (Maatkit)
User account administration
Securich
• http://www.securich.com/
• Written by Darren Cassar (aka “MySQL Preacher”)
• Implemented as Stored Routines
• Roles & user groups
• Cloning of user accounts
• Flexible privilege assignment
• Improved password handling
• Fast blocking of user accounts
oak-block-account
• Block or release connections for specific accounts
• Without changing privileges
• Optionally kill any existing connections

$ oak-block-account -u root 
–ask-pass --account-user=<someuser>
Monitoring
mytop
• http://jeremy.zawodny.com/mysql/mytop/
• A top clone for MySQL
• Written in Perl
• Console based
• Monitoring of threads and overall performance
innotop
• http://code.google.com/p/innotop/
• MySQL/InnoDB transaction/status monitor, inspired
  by mytop
• Perl
• Monitoring of
  – Replication status
  – Queries
  – InnoDB Transactions, Locks...
mycheckpoint
• http://code.openark.org/forge/mycheckpoint
• Python
• Monitoring utility with a strong emphasis on user
  accessibility to monitored data
• SQL oriented: charts, reports and advanced
  metrics are generated on the fly with views.
Backup
mk-parallel-dump/restore
• Multi-threaded SQL dumps
• One subdirectory per DB
• Dump Compression
• Backups can be split up into chunks
• Saves binlog position
• Supports regular Expressions
mydumper
• https://launchpad.net/mydumper
• Developed in C (glib, pcre)
• Parallel Data Dumps
• Easy to parse output
• Regular expressions
• Consistency
  – Snapshot across all threads
  – Stores Master/Slave binlog positions
xtrabackup
• https://launchpad.net/percona-xtrabackup
• Online backup for InnoDB / MyISAM
• 2010-04-12: Version 1.2 (incl. Windows)
• In my.cnf:
  [xtrabackup]
  target_dir = /home/backups
• Backup command:
  $ xtrabackup –backup
mylvmbackup
• http://www.lenzg.net/mylvmbackup/
• Perl Script
• Fast creation of MySQL backups using LVM-
  Snapshots (Linux)
• Supports tar, rsync or rsnap to back up the data
  (rdiff soon)
• Archive names with timestamps
Auditing/Security
oak-security-audit
• Regular, automatic checking of
  – Non-local root-accounts
  – Anonymous user accounts
  – Accounts without a hostname
  – Accounts using empty or identical passwords
  – Non-root accounts with full privileges


$ oak-security-audit 
  -u root --ask-pass
Performance tuning
MySQL Tuning Primer
• https://launchpad.net/mysql-tuning-primer
• Shell script by Matthew Montgomery
• Takes information from "SHOW STATUS LIKE..."
  and "SHOW VARIABLES LIKE..."
• Attempts to produce sane recommendations for
  tuning server variables
• Inspired by Gert Dewit's MySQL AR
mysqltuner
• https://launchpad.net/mysqltuner
• Perl
• Examines the database environment
• Provides performance tuning data and
  recommendations.
• Inspired by the MySQL Tuning Primer

$ mysqltuner.pl –recommend 
  --config tuner-default.cnf
mysqlreport
• Part of the HackMySQL toolkit
• Well-documented Perl script
• Reports important MySQL status values
• Transforms SHOW STATUS values into an easy-
  to-read report
• A better alternative to manually interpreting SHOW
  STATUS output
• Must-read: “The Guide To Understanding
  mysqlreport”
mext
• http://code.google.com/p/aspersa/
• Shell script
• BSD license
• Runs mysqladmin extended-status and
  formats it nicely
• Can also read from saved files
• Supports incremental, differential and relative
  output
Replication
Monitoring replication
• mk-heartbeat
 – Uses separate heartbeat table
 – Frequently updates a time stamp on the master and
   measures replication delay
 – Master and slave clocks must be in sync
• mk-table-checksum
 – Performs an online replication consistency check
 – Checksums MySQL tables on one or many servers
Monitoring replication (Cont.)
• oak-get-slave-lag
 – Reads master status and iterates through SHOW
   SLAVE STATUS
 – Triggers an error if threshold is reached
• oak-show-replication-status
 – Shows how far behind replicating slaves are on a given
   master
Replication maintenance
• oak-purge-master-logs
 – Purges master logs while considering the replicating
   slaves
• mk-slave-find
 – Connects to a MySQL replication master and finds its
   slaves
 – Prints a tree-like view of the replication hierarchy
• mk-slave-move
 – Move a MySQL slave around in the replication hierarchy
Q&A




 Questions, Comments?
Thank you!




    Lenz Grimmer <lenz@sun.com>
    http://lenzg.net/ | Twitter: @lenzgr

More Related Content

PDF
What's new in MySQL 5.5? FOSDEM 2011
PDF
Making MySQL Administration a Breeze - A look into a MySQL DBA's toolchest
PDF
Cool MariaDB Plugins
PDF
Better encryption & security with MariaDB 10.1 & MySQL 5.7
PPTX
Silverstripe at scale - design & architecture for silverstripe applications
PDF
Next Generation DevOps in Drupal: DrupalCamp London 2014
PDF
MariaDB Server & MySQL Security Essentials 2016
PDF
Tuning Linux for your database FLOSSUK 2016
What's new in MySQL 5.5? FOSDEM 2011
Making MySQL Administration a Breeze - A look into a MySQL DBA's toolchest
Cool MariaDB Plugins
Better encryption & security with MariaDB 10.1 & MySQL 5.7
Silverstripe at scale - design & architecture for silverstripe applications
Next Generation DevOps in Drupal: DrupalCamp London 2014
MariaDB Server & MySQL Security Essentials 2016
Tuning Linux for your database FLOSSUK 2016

What's hot (20)

PDF
Databases in the hosted cloud
PDF
Highly Available MySQL/PHP Applications with mysqlnd
PDF
MariaDB - the "new" MySQL is 5 years old and everywhere (LinuxCon Europe 2015)
PDF
Meet MariaDB 10.1 at the Bulgaria Web Summit
PDF
Modern MySQL Monitoring and Dashboards.
PDF
JavaCro'14 - Using WildFly core to build high performance web server – Tomaž ...
PDF
Meet MariaDB Server 10.1 London MySQL meetup December 2015
PDF
Securing your MySQL / MariaDB Server data
PPT
Using galera replication to create geo distributed clusters on the wan
PPTX
Performance out
PDF
Transitioning From SQL Server to MySQL - Presentation from Percona Live 2016
PDF
MySQL for Beginners - part 1
PDF
Lessons from database failures
PPTX
Percona tool kit for MySQL DBA's
PDF
Best practices for MySQL/MariaDB Server/Percona Server High Availability
PDF
Introduction to Galera Cluster
PPTX
OGDC2012 Lua In Game_Mr. Van, Nguyen Ngoc
PPTX
OGDC Datastorage Solution_Mr.Dung, Dinh Nguyen Anh
PDF
Jolokia - JMX on Capsaicin (Devoxx 2011)
PPT
Codership's galera cluster installation and quickstart webinar march 2016
Databases in the hosted cloud
Highly Available MySQL/PHP Applications with mysqlnd
MariaDB - the "new" MySQL is 5 years old and everywhere (LinuxCon Europe 2015)
Meet MariaDB 10.1 at the Bulgaria Web Summit
Modern MySQL Monitoring and Dashboards.
JavaCro'14 - Using WildFly core to build high performance web server – Tomaž ...
Meet MariaDB Server 10.1 London MySQL meetup December 2015
Securing your MySQL / MariaDB Server data
Using galera replication to create geo distributed clusters on the wan
Performance out
Transitioning From SQL Server to MySQL - Presentation from Percona Live 2016
MySQL for Beginners - part 1
Lessons from database failures
Percona tool kit for MySQL DBA's
Best practices for MySQL/MariaDB Server/Percona Server High Availability
Introduction to Galera Cluster
OGDC2012 Lua In Game_Mr. Van, Nguyen Ngoc
OGDC Datastorage Solution_Mr.Dung, Dinh Nguyen Anh
Jolokia - JMX on Capsaicin (Devoxx 2011)
Codership's galera cluster installation and quickstart webinar march 2016
Ad

Viewers also liked (16)

PDF
web PR / FuturePR
PPTX
Percona Live London 2014 - MySQL Backup Strategy @ IEDR
PDF
Mysql administration
PDF
The Peoper Care and Feeding of a MySQL Server for Busy Linux Admin
PDF
U C2007 My S Q L Performance Cookbook
PDF
Managing MySQL with Ansible
PDF
SAP HANA Cookbook for MySQL Developers
PDF
MySQL Monitoring 101
PDF
MySQL Performance Metrics that Matter
PPT
Extended Essay
DOCX
Rancangan tahunan matematik tingkatan 5 2013
PPT
MySQL 5.7: Performance Schema Improvements
ODP
MySQL Administration and Monitoring
PPT
Basics Of English Grammar 2 Ppt
PPTX
A comprehensive English grammar guide for EFL/ESL teachers
PDF
A comprehensive grammar of the english language quirk greenbaum leech svartvik
web PR / FuturePR
Percona Live London 2014 - MySQL Backup Strategy @ IEDR
Mysql administration
The Peoper Care and Feeding of a MySQL Server for Busy Linux Admin
U C2007 My S Q L Performance Cookbook
Managing MySQL with Ansible
SAP HANA Cookbook for MySQL Developers
MySQL Monitoring 101
MySQL Performance Metrics that Matter
Extended Essay
Rancangan tahunan matematik tingkatan 5 2013
MySQL 5.7: Performance Schema Improvements
MySQL Administration and Monitoring
Basics Of English Grammar 2 Ppt
A comprehensive English grammar guide for EFL/ESL teachers
A comprehensive grammar of the english language quirk greenbaum leech svartvik
Ad

Similar to Making MySQL Administration a Breeze - A Look Into a MySQL DBA's Toolchest (20)

PDF
MySQL Utilities -- PyTexas 2015
PDF
MySQL Workbench for DFW Unix Users Group
PPTX
MySQL Utilities -- Cool Tools For You: PHP World Nov 16 2016
PDF
MySQL Workbench and Visual Explain -- RMUG Feb 19th 2015
PDF
Python Utilities for Managing MySQL Databases
PDF
MySQL Shell - The Best MySQL DBA Tool
PDF
My S Q L Introduction for 1 day training
PDF
My sql introduction for Bestcom
PDF
Percona Live '18 Tutorial: The Accidental DBA
PDF
Welcome to MySQL
PDF
MySQL Shell: the daily tool for devs and admins. By Vittorio Cioe.
PDF
My sql susecon_crashcourse_2012
PDF
Proper Care and Feeding of a MySQL Database for Busy Linux Administrators
PDF
Linuxfest Northwest Proper Care and Feeding Of a MySQL for Busy Linux Admins
PDF
State of the Dolphin 2020 - 25th Anniversary of MySQL with 8.0.20
PDF
MySQL Server Backup, Restoration, And Disaster Recovery Planning Presentation
PDF
The Proper Care and Feeding of a MySQL Database for Busy Linux Admins -- SCaL...
PDF
The MySQL Diaspora
PPT
MySQL in Oracle environment : Quick start guide for Oracle DBA (Part 1)
PPT
Fudcon talk.ppt
MySQL Utilities -- PyTexas 2015
MySQL Workbench for DFW Unix Users Group
MySQL Utilities -- Cool Tools For You: PHP World Nov 16 2016
MySQL Workbench and Visual Explain -- RMUG Feb 19th 2015
Python Utilities for Managing MySQL Databases
MySQL Shell - The Best MySQL DBA Tool
My S Q L Introduction for 1 day training
My sql introduction for Bestcom
Percona Live '18 Tutorial: The Accidental DBA
Welcome to MySQL
MySQL Shell: the daily tool for devs and admins. By Vittorio Cioe.
My sql susecon_crashcourse_2012
Proper Care and Feeding of a MySQL Database for Busy Linux Administrators
Linuxfest Northwest Proper Care and Feeding Of a MySQL for Busy Linux Admins
State of the Dolphin 2020 - 25th Anniversary of MySQL with 8.0.20
MySQL Server Backup, Restoration, And Disaster Recovery Planning Presentation
The Proper Care and Feeding of a MySQL Database for Busy Linux Admins -- SCaL...
The MySQL Diaspora
MySQL in Oracle environment : Quick start guide for Oracle DBA (Part 1)
Fudcon talk.ppt

More from Lenz Grimmer (20)

PDF
Ceph Management and Monitoring - DevConf.CZ - 2019-01-26
PDF
Managing and Monitoring Ceph - Ceph Day Berlin - 2018-11-12
PDF
Ceph Management and Monitoring with Dashboard V2 - Cephalocon 2018-03-23
PDF
Ceph and Storage Management with openATTIC - FOSDEM 2017-02-05
PDF
Ceph and Storage Management with openATTIC - Ceph Day Munich - 2016-09-23
PDF
Ceph and Storage Management in openATTIC - solutions.hamburg - 2016-09-09
PDF
Storage Monitoring in openATTIC - Monitoring Workshop - 2016-09-07
PDF
Ceph and Storage Management with openATTIC - FrOSCon 2016-08-21
PDF
Ceph and Storage Management with openATTIC - SUSE MOST - 2016-06-07
PDF
Ceph and Storage Management with openATTIC, Ceph Tech Talks 2016-06-23
PDF
Ceph and Storage Management with openATTIC, openSUSE Conference 2016-06-23
PDF
Storage Management mit openAttic - LinuxDay - 2015-11-21
PDF
Flexibles Storage Management unter Linux mit OpenATTIC - Kielux 2015-09-18
PDF
The Evolution of Storage on Linux - FrOSCon - 2015-08-22
PDF
MySQL 5.5 Replication Enhancements – An Overview (FOSDEM 2011)
PDF
MySQL High Availability Solutions
PDF
How to build your own Quadrocopter
PDF
What's new in MySQL 5.5?
PDF
ZFS unter Linux
PDF
Arbeiten in einer virtuellen Firma - MySQL
Ceph Management and Monitoring - DevConf.CZ - 2019-01-26
Managing and Monitoring Ceph - Ceph Day Berlin - 2018-11-12
Ceph Management and Monitoring with Dashboard V2 - Cephalocon 2018-03-23
Ceph and Storage Management with openATTIC - FOSDEM 2017-02-05
Ceph and Storage Management with openATTIC - Ceph Day Munich - 2016-09-23
Ceph and Storage Management in openATTIC - solutions.hamburg - 2016-09-09
Storage Monitoring in openATTIC - Monitoring Workshop - 2016-09-07
Ceph and Storage Management with openATTIC - FrOSCon 2016-08-21
Ceph and Storage Management with openATTIC - SUSE MOST - 2016-06-07
Ceph and Storage Management with openATTIC, Ceph Tech Talks 2016-06-23
Ceph and Storage Management with openATTIC, openSUSE Conference 2016-06-23
Storage Management mit openAttic - LinuxDay - 2015-11-21
Flexibles Storage Management unter Linux mit OpenATTIC - Kielux 2015-09-18
The Evolution of Storage on Linux - FrOSCon - 2015-08-22
MySQL 5.5 Replication Enhancements – An Overview (FOSDEM 2011)
MySQL High Availability Solutions
How to build your own Quadrocopter
What's new in MySQL 5.5?
ZFS unter Linux
Arbeiten in einer virtuellen Firma - MySQL

Recently uploaded (20)

PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
Cloud computing and distributed systems.
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
KodekX | Application Modernization Development
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
Spectroscopy.pptx food analysis technology
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Chapter 3 Spatial Domain Image Processing.pdf
Cloud computing and distributed systems.
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
KodekX | Application Modernization Development
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Building Integrated photovoltaic BIPV_UPV.pdf
Network Security Unit 5.pdf for BCA BBA.
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Spectroscopy.pptx food analysis technology
Diabetes mellitus diagnosis method based random forest with bat algorithm
20250228 LYD VKU AI Blended-Learning.pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Unlocking AI with Model Context Protocol (MCP)
Reach Out and Touch Someone: Haptics and Empathic Computing
Agricultural_Statistics_at_a_Glance_2022_0.pdf

Making MySQL Administration a Breeze - A Look Into a MySQL DBA's Toolchest