Chapter 42
MySQL 8.4 New Features
MySQL 8.4 LTS + 9.x New Features
MySQL 8.4 released in April 2024 is MySQL's first explicitly labeled LTS (Long-Term Support) release, supported until 2032. This chapter covers the key changes in 8.4 and previews the 9.x Innovation Track.
1. New LTS Versioning Policy
Starting with 8.4, Oracle introduced dual tracks:
| Track | Example | Release Cadence | Support | Use Case |
|---|---|---|---|---|
| LTS Track | 8.4.x | Every 2 years | 5+3 years | Production, stability first |
| Innovation Track | 9.0, 9.1, 9.2... | Quarterly | Until next release | Evaluation, dev environments |
2. Key Default Value Changes (Critical for Upgrades)
Before upgrading: Run
util.checkForServerUpgrade()in MySQL Shell to detect incompatibilities. Default changes can silently alter system behavior.
- Authentication:
mysql_native_passwordis disabled by default → old drivers may fail to connect - Replication:
binlog_transaction_dependency_trackingdefaults to WRITESET (better parallel replication performance) - MGR:
group_replication_paxos_single_leaderdefaults to ON
3. Key New Features in 8.4
3.1 Replication command renaming
-- New syntax (preferred in 8.4+)
SHOW REPLICA STATUS\G
CHANGE REPLICATION SOURCE TO SOURCE_HOST='...', ...;
START REPLICA;
STOP REPLICA;
RESET BINARY LOGS AND GTIDS;
-- Old syntax is deprecated (removed in 9.x)
-- SHOW SLAVE STATUS / CHANGE MASTER TO / START SLAVE / RESET MASTER
3.2 Authentication changes
-- Check current user authentication plugins
SELECT user, plugin FROM mysql.user;
-- Migrate to caching_sha2_password
ALTER USER 'myapp'@'%' IDENTIFIED WITH caching_sha2_password BY 'password';
-- Verify JDBC driver >= 8.x for caching_sha2_password support
3.3 EXPLAIN enhancements
-- Store EXPLAIN output into variable (new in 8.4)
EXPLAIN FORMAT=JSON INTO @result SELECT * FROM orders WHERE user_id = 1;
SELECT JSON_PRETTY(@result);
4. Deprecated Features
| Deprecated | Replacement |
|---|---|
| SHOW SLAVE STATUS | SHOW REPLICA STATUS |
| CHANGE MASTER TO | CHANGE REPLICATION SOURCE TO |
| START/STOP SLAVE | START/STOP REPLICA |
| RESET MASTER | RESET BINARY LOGS AND GTIDS |
| mysql_native_password plugin | caching_sha2_password |
5. MySQL 9.x Innovation Track Preview
9.0 Highlights (July 2024)
- VECTOR data type: Native vector storage + ANN search — major feature for AI applications
- JavaScript stored programs: Write stored procedures/functions in JavaScript (via GraalVM)
- mysql_native_password removed: Only deprecated in 8.4, completely removed in 9.0
- All SLAVE commands removed: Replaced entirely by REPLICA commands
-- MySQL 9.0+ VECTOR type
CREATE TABLE embeddings (
id INT PRIMARY KEY AUTO_INCREMENT,
content TEXT,
embedding VECTOR(1536) -- OpenAI ada-002 dimensions
);
-- Similarity search (cosine distance)
SELECT id, content,
VECTOR_DISTANCE(embedding, TO_VECTOR('[...]'), 'COSINE') AS dist
FROM embeddings ORDER BY dist LIMIT 5;
Recommendation: MySQL 8.4 is the recommended production version. The VECTOR type in 9.x is the most exciting feature, but 9.x is Innovation Track — wait for a stable LTS before using in production.