background

MySQL Change Database Encoding

License: GPL v3Ruby

In computing, character encoding is a foundational element, dictating how text is stored and retrieved. Historically, many MySQL databases adopted utf8 as their character set. However, as digital communication evolved, the need to support a broader range of characters—especially emojis and complex international scripts—highlighted a limitation: utf8 in MySQL only supports up to 3-byte characters. This led to the widespread adoption of utf8mb4, which provides full 4-byte Unicode support.

Migrating a live production database from utf8 to utf8mb4 (or any other encoding) presents a significant challenge. Direct ALTER TABLE operations can lock tables for extended periods, leading to unacceptable downtime for critical applications. The goal, therefore, is to achieve this migration safely, efficiently, and with minimal disruption.

Find out more on GitHub

Why We Built This

At Durable Programming, we frequently encounter recurring challenges across our diverse client base. Rather than reinventing the wheel, we extract these solutions into robust, maintainable open source tools. This project was born out of a practical need to solve a specific problem efficiently, with a focus on durability, testability, and clear code architecture.

How to Contribute

We strongly believe in the power of collaborative software development. If you find a bug, have a feature request, or want to contribute code, we welcome your input! Please visit our GitHub repository to open an issue or submit a pull request. We strive to maintain a welcoming and responsive environment for all contributors, regardless of their experience level.

Open Source Philosophy

Our commitment to open source extends beyond simply publishing code. We actively maintain our projects, ensuring they remain compatible with modern environments and security standards. By using our tools, you benefit from the same high standards we apply to our commercial client work.