Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Data Engineering
  3. mysql_utils

mysql_utils

GPL-2.0Python

A collection of Python scripts for automating MySQL server lifecycle management, backups, failovers, and replication monitoring in production environments.

GitHubGitHub
881 stars136 forks0 contributors

What is mysql_utils?

Pinterest MySQL Management Tools is a collection of Python scripts designed to automate the lifecycle management of MySQL databases in production environments. It solves the problem of manually handling server provisioning, replication, failovers, backups, and monitoring by providing a suite of utilities that integrate with service discovery and cloud infrastructure. The tools enable reliable, scalable database operations with minimal human intervention.

Target Audience

DevOps engineers, database administrators, and platform teams managing large-scale MySQL deployments in production environments, particularly those using AWS and Zookeeper for service discovery.

Value Proposition

Developers choose these tools because they provide battle-tested automation for critical database operations, reducing manual errors and operational overhead. The unique selling point is the comprehensive coverage of MySQL lifecycle management, from server launch to retirement, with tight integration into Pinterest's production infrastructure.

Overview

Pinterest MySQL Management Tools

Use Cases

Best For

  • Automating MySQL server replacement and failover procedures
  • Managing replication and monitoring lag across database clusters
  • Implementing backup and restore workflows for MySQL databases
  • Integrating database management with Zookeeper-based service discovery
  • Handling retirement of unused database servers safely
  • Building custom MySQL automation tools for large-scale deployments

Not Ideal For

  • Environments without Zookeeper or similar service discovery systems
  • Teams needing support for complex replication topologies with more than two slaves
  • Organizations requiring actively maintained and supported database tools
  • Small-scale deployments where manual management outweighs integration effort

Pros & Cons

Pros

Automated Lifecycle Management

Scripts like launch_replacement_db_host.py and mysql_failover.py handle server replacement and failovers automatically, computing parameters and updating replication without manual intervention, as shown in the examples.

Integrated Service Discovery

Tools tightly integrate with Zookeeper for hostname, username, and password management, providing a contract between administrative tools and applications, as described in the basics of MySQL at Pinterest.

Comprehensive Backup Solutions

Supports logical and xtrabackup backups via mysql_backup.py, with automated restoration and replication setup through mysql_restore.py, covering critical data protection needs.

Replication Monitoring Tools

Includes check_mysql_replication.py for real-time lag and thread status monitoring, using pt-heartbeat for accurate seconds-behind calculations, ensuring database health.

Cons

Significant Customization Required

The README explicitly states 'these tools will not just work' and require adding glue code for service discovery, CMDB, and environment specifics, making out-of-the-box use impossible.

Legacy Topology Limitations

Admits 'lack of support for more than two slaves,' which restricts scalability for modern deployments needing larger replica sets or multi-master setups.

Abandoned by Maintainers

Project is no longer actively maintained by Pinterest, posing risks for security updates, bug fixes, and compatibility with newer MySQL versions or cloud services.

Frequently Asked Questions

Quick Stats

Stars881
Forks136
Contributors0
Open Issues1
Last commit6 years ago
CreatedSince 2015

Tags

#replication#devops-tools#failover#mysql#backup-restore#python-scripts#service-discovery

Built With

M
MySQL
A
AWS
S
S3
Z
Zookeeper
P
Python

Included in

Data Engineering8.5k
Auto-fetched 1 day ago

Related Projects

TiDBTiDB

TiDB is built for agentic workloads that grow unpredictably, with ACID guarantees and native support for transactions, analytics, and vector search. No data silos. No noisy neighbors. No infrastructure ceiling.

Stars40,052
Forks6,180
Last commit1 day ago
InfluxDBInfluxDB

Scalable datastore for metrics, events, and real-time analytics

Stars31,485
Forks3,704
Last commit4 days ago
RQLiteRQLite

The lightweight, fault-tolerant database built on SQLite. Designed to keep your data highly available with minimal effort.

Stars17,470
Forks780
Last commit1 day ago
ScyllaDBScyllaDB

NoSQL data store using the Seastar framework, compatible with Apache Cassandra and Amazon DynamoDB

Stars15,514
Forks1,479
Last commit1 day ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub