Databases 8 min read

How to Safely Migrate from MySQL 5.7 Before Its End‑of‑Life

With MySQL 5.7 reaching end‑of‑life in October 2023 and over half of installations still on that version, this guide explains the new features of MySQL 8.0, how to assess upgrade readiness, and the three main migration paths—including staying put, moving to a DBaaS, or switching to PostgreSQL.

dbaplus Community
dbaplus Community
dbaplus Community
How to Safely Migrate from MySQL 5.7 Before Its End‑of‑Life

Background

According to DB‑Engines, MySQL remains the world’s most popular open‑source database and has been the second‑most‑used database for over a decade. Version 5.7 will enter end‑of‑life (EOL) in October 2023, meaning it will no longer receive updates or security patches. Telemetry from Percona Monitoring and Management shows that more than 50% of MySQL servers in the wild are still running 5.7, leaving many installations only four months from EOL.

New Features in MySQL 8.0

MySQL 8.0, the only supported MySQL version going forward, introduces several major enhancements:

Lateral‑derived joins and Common Table Expressions (CTEs) for easier sub‑query writing.

A new INTERSECT clause for set operations. EXPLAIN ANALYZE for detailed query performance diagnostics. INVISIBLE INDEX to test index effectiveness without risking destructive rebuilds.

Default character set changed to utf8mb4, providing full Unicode 9.0 support for international characters.

Assessing Upgrade Readiness

The upgrade must be one‑way, so you need to verify that your applications and databases can handle the changes. MySQL Shell offers the util.checkForServerUpgrade() utility, which runs 21 tests covering reserved keyword conflicts, partition engine compatibility, circular directory references in tablespace files, deprecated functions, and altered system variables.

Migration Options

Based on the assessment, you can choose one of three paths:

Do nothing : Accept the risk of running an unsupported version if migration costs outweigh security and support concerns. Some organizations stay on 5.7 when the application is isolated from the internet and plans a future upgrade.

Migrate to MySQL 8.0 while keeping the database on‑premises or moving it to a cloud‑based MySQL‑compatible service (DBaaS). DBaaS reduces infrastructure management overhead but still requires regular updates.

Switch to a different database : Consider PostgreSQL, which now supports the MERGE command (added in PostgreSQL 15) and offers a robust open‑source ecosystem. Migration may involve code rewrites, but if you’re already updating to MySQL 8.0, a full switch could be worthwhile.

Choosing Between MySQL and PostgreSQL

PostgreSQL’s large community, recent feature parity (e.g., MERGE), and flexible licensing make it a common alternative. However, verify that any managed PostgreSQL service you evaluate fully supports the open‑source version without proprietary extensions that could lock you in.

Conclusion

Migrating from MySQL 5.7 to 8.0—or to another platform—will be a priority for many developers and DBAs in the coming months. By reviewing existing applications, estimating effort, and weighing infrastructure preferences, you can select the path that balances cost, risk, and long‑term maintainability.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

mysqlPostgreSQLEOLDBaaS
dbaplus Community
Written by

dbaplus Community

Enterprise-level professional community for Database, BigData, and AIOps. Daily original articles, weekly online tech talks, monthly offline salons, and quarterly XCOPS&DAMS conferences—delivered by industry experts.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.