SlideShare ist ein Scribd-Unternehmen logo
1 von 32
Downloaden Sie, um offline zu lesen
<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

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Databases in the hosted cloud
Databases in the hosted cloudDatabases in the hosted cloud
Databases in the hosted cloud
 
Highly Available MySQL/PHP Applications with mysqlnd
Highly Available MySQL/PHP Applications with mysqlndHighly Available MySQL/PHP Applications with mysqlnd
Highly Available MySQL/PHP Applications with mysqlnd
 
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)
 
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
 
Modern MySQL Monitoring and Dashboards.
Modern MySQL Monitoring and Dashboards.Modern MySQL Monitoring and Dashboards.
Modern MySQL Monitoring and Dashboards.
 
JavaCro'14 - Using WildFly core to build high performance web server – Tomaž ...
JavaCro'14 - Using WildFly core to build high performance web server – Tomaž ...JavaCro'14 - Using WildFly core to build high performance web server – Tomaž ...
JavaCro'14 - Using WildFly core to build high performance web server – Tomaž ...
 
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
 
Securing your MySQL / MariaDB Server data
Securing your MySQL / MariaDB Server dataSecuring your MySQL / MariaDB Server data
Securing your MySQL / MariaDB Server data
 
Using galera replication to create geo distributed clusters on the wan
Using galera replication to create geo distributed clusters on the wanUsing galera replication to create geo distributed clusters on the wan
Using galera replication to create geo distributed clusters on the wan
 
Performance out
Performance outPerformance out
Performance out
 
Transitioning From SQL Server to MySQL - Presentation from Percona Live 2016
Transitioning From SQL Server to MySQL - Presentation from Percona Live 2016Transitioning From SQL Server to MySQL - Presentation from Percona Live 2016
Transitioning From SQL Server to MySQL - Presentation from Percona Live 2016
 
MySQL for Beginners - part 1
MySQL for Beginners - part 1MySQL for Beginners - part 1
MySQL for Beginners - part 1
 
Lessons from database failures
Lessons from database failuresLessons from database failures
Lessons from database failures
 
Percona tool kit for MySQL DBA's
Percona tool kit for MySQL DBA'sPercona tool kit for MySQL DBA's
Percona tool kit for MySQL DBA's
 
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
 
Introduction to Galera Cluster
Introduction to Galera ClusterIntroduction to Galera Cluster
Introduction to Galera Cluster
 
OGDC2012 Lua In Game_Mr. Van, Nguyen Ngoc
OGDC2012 Lua In Game_Mr. Van, Nguyen NgocOGDC2012 Lua In Game_Mr. Van, Nguyen Ngoc
OGDC2012 Lua In Game_Mr. Van, Nguyen Ngoc
 
OGDC Datastorage Solution_Mr.Dung, Dinh Nguyen Anh
OGDC Datastorage Solution_Mr.Dung, Dinh Nguyen AnhOGDC Datastorage Solution_Mr.Dung, Dinh Nguyen Anh
OGDC Datastorage Solution_Mr.Dung, Dinh Nguyen Anh
 
Jolokia - JMX on Capsaicin (Devoxx 2011)
Jolokia - JMX on Capsaicin (Devoxx 2011)Jolokia - JMX on Capsaicin (Devoxx 2011)
Jolokia - JMX on Capsaicin (Devoxx 2011)
 
Codership's galera cluster installation and quickstart webinar march 2016
Codership's galera cluster installation and quickstart webinar march 2016Codership's galera cluster installation and quickstart webinar march 2016
Codership's galera cluster installation and quickstart webinar march 2016
 

Andere mochten auch

U C2007 My S Q L Performance Cookbook
U C2007  My S Q L  Performance  CookbookU C2007  My S Q L  Performance  Cookbook
U C2007 My S Q L Performance Cookbook
guestae36d0
 
Rancangan tahunan matematik tingkatan 5 2013
Rancangan tahunan matematik tingkatan 5 2013Rancangan tahunan matematik tingkatan 5 2013
Rancangan tahunan matematik tingkatan 5 2013
Saini Bakar
 
MySQL Administration and Monitoring
MySQL Administration and MonitoringMySQL Administration and Monitoring
MySQL Administration and Monitoring
Mark Leith
 
Basics Of English Grammar 2 Ppt
Basics Of English Grammar 2 PptBasics Of English Grammar 2 Ppt
Basics Of English Grammar 2 Ppt
laurajim21
 

Andere mochten auch (16)

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

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

My sql introduction for Bestcom
My sql introduction for BestcomMy sql introduction for Bestcom
My sql introduction for Bestcom
Ivan Tu
 
My S Q L Introduction for 1 day training
My S Q L  Introduction for 1 day trainingMy S Q L  Introduction for 1 day training
My S Q L Introduction for 1 day training
Ivan Tu
 
Infrastructure review - Shining a light on the Black Box
Infrastructure review - Shining a light on the Black BoxInfrastructure review - Shining a light on the Black Box
Infrastructure review - Shining a light on the Black Box
Miklos Szel
 
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
 
MariaDB Galera Cluster
MariaDB Galera ClusterMariaDB Galera Cluster
MariaDB Galera Cluster
Abdul Manaf
 
Optimizing MySQL for Cascade Server
Optimizing MySQL for Cascade ServerOptimizing MySQL for Cascade Server
Optimizing MySQL for Cascade Server
hannonhill
 
SQL Server Clustering for Dummies
SQL Server Clustering for DummiesSQL Server Clustering for Dummies
SQL Server Clustering for Dummies
Mark Broadbent
 

Ähnlich wie Making MySQL Administration a Breeze - A Look Into a MySQL DBA's Toolchest (20)

Apache Performance Tuning: Scaling Up
Apache Performance Tuning: Scaling UpApache Performance Tuning: Scaling Up
Apache Performance Tuning: Scaling Up
 
MySQL Webinar 2/4 Performance tuning, hardware, optimisation
MySQL Webinar 2/4 Performance tuning, hardware, optimisationMySQL Webinar 2/4 Performance tuning, hardware, optimisation
MySQL Webinar 2/4 Performance tuning, hardware, optimisation
 
My sql introduction for Bestcom
My sql introduction for BestcomMy sql introduction for Bestcom
My sql introduction for Bestcom
 
My S Q L Introduction for 1 day training
My S Q L  Introduction for 1 day trainingMy S Q L  Introduction for 1 day training
My S Q L Introduction for 1 day training
 
Infrastructure review - Shining a light on the Black Box
Infrastructure review - Shining a light on the Black BoxInfrastructure review - Shining a light on the Black Box
Infrastructure review - Shining a light on the Black Box
 
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
 
Apache Performance Tuning: Scaling Out
Apache Performance Tuning: Scaling OutApache Performance Tuning: Scaling Out
Apache Performance Tuning: Scaling Out
 
Maria DB Galera Cluster for High Availability
Maria DB Galera Cluster for High AvailabilityMaria DB Galera Cluster for High Availability
Maria DB Galera Cluster for High Availability
 
MariaDB Galera Cluster
MariaDB Galera ClusterMariaDB Galera Cluster
MariaDB Galera Cluster
 
High Performance Drupal Sites
High Performance Drupal SitesHigh Performance Drupal Sites
High Performance Drupal Sites
 
Optimizing MySQL for Cascade Server
Optimizing MySQL for Cascade ServerOptimizing MySQL for Cascade Server
Optimizing MySQL for Cascade Server
 
Collaborate 2012 - Administering MySQL for Oracle DBAs
Collaborate 2012 - Administering MySQL for Oracle DBAsCollaborate 2012 - Administering MySQL for Oracle DBAs
Collaborate 2012 - Administering MySQL for Oracle DBAs
 
MariaDB: in-depth (hands on training in Seoul)
MariaDB: in-depth (hands on training in Seoul)MariaDB: in-depth (hands on training in Seoul)
MariaDB: in-depth (hands on training in Seoul)
 
Play Framework and Activator
Play Framework and ActivatorPlay Framework and Activator
Play Framework and Activator
 
MySQL for Oracle DBAs
MySQL for Oracle DBAsMySQL for Oracle DBAs
MySQL for Oracle DBAs
 
Training Slides: 101 - Basics: Tungsten Clustering - Under The Hood
Training Slides: 101 - Basics: Tungsten Clustering - Under The HoodTraining Slides: 101 - Basics: Tungsten Clustering - Under The Hood
Training Slides: 101 - Basics: Tungsten Clustering - Under The Hood
 
SQL Server Clustering for Dummies
SQL Server Clustering for DummiesSQL Server Clustering for Dummies
SQL Server Clustering for Dummies
 
MySQL highav Availability
MySQL highav AvailabilityMySQL highav Availability
MySQL highav Availability
 
Performance out
Performance outPerformance out
Performance out
 
A Closer Look at Apache Kudu
A Closer Look at Apache KuduA Closer Look at Apache Kudu
A Closer Look at Apache Kudu
 

Mehr von Lenz Grimmer

MySQL 5.5 Replication Enhancements – An Overview (FOSDEM 2011)
MySQL 5.5 Replication Enhancements – An Overview (FOSDEM 2011)MySQL 5.5 Replication Enhancements – An Overview (FOSDEM 2011)
MySQL 5.5 Replication Enhancements – An Overview (FOSDEM 2011)
Lenz Grimmer
 
MySQL High Availability Solutions
MySQL High Availability SolutionsMySQL High Availability Solutions
MySQL High Availability Solutions
Lenz Grimmer
 

Mehr von Lenz Grimmer (20)

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

Kürzlich hochgeladen

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Kürzlich hochgeladen (20)

A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 

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

  • 1. <Insert Picture Here> Making MySQL Administration a Breeze A look into a MySQL DBA's toolchest Lenz Grimmer MySQL Community Relations Manager
  • 2. 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.
  • 3. 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
  • 4. Maatkit • http://maatkit.org/ • Perl script collection • >25 tools • All tools are standalone • Minimal dependencies • Docs embedded in the tools • Exhaustive test suite
  • 5. Openark kit • http://code.openark.org/forge/openark-kit/ • Python script collection • 10 tools • BSD License • Written by Shlomi Noach
  • 6. 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)
  • 7. 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)
  • 9. 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
  • 10. 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>
  • 12. mytop • http://jeremy.zawodny.com/mysql/mytop/ • A top clone for MySQL • Written in Perl • Console based • Monitoring of threads and overall performance
  • 13. innotop • http://code.google.com/p/innotop/ • MySQL/InnoDB transaction/status monitor, inspired by mytop • Perl • Monitoring of – Replication status – Queries – InnoDB Transactions, Locks...
  • 14. 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.
  • 16. 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
  • 17. 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
  • 18. 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
  • 19. 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
  • 21. 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
  • 23. 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
  • 24. 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
  • 25. 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”
  • 26. 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
  • 28. 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
  • 29. 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
  • 30. 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
  • 32. Thank you! Lenz Grimmer <lenz@sun.com> http://lenzg.net/ | Twitter: @lenzgr