Home Database MySQL 8.4 & 9.0: New Features and Migration Guide
Intermediate 4 min · July 13, 2026

MySQL 8.4 & 9.0: New Features and Migration Guide

Explore new features in MySQL 8.4 and 9.0 including performance improvements, security enhancements, and a step-by-step migration guide for production databases..

N
Naren Founder & Principal Engineer

20+ years shipping high-throughput database systems. Everything here is grounded in real deployments.

Follow
Production
production tested
July 13, 2026
last updated
2,165
articles · all by Naren
Before you start⏱ 15-20 min read
  • Basic knowledge of SQL (SELECT, INSERT, UPDATE, DELETE)
  • Familiarity with MySQL installation and configuration
  • Access to a MySQL server (version 8.0 or higher) for testing
  • Understanding of database backup and restore concepts
 ● Production Incident 🔎 Debug Guide ⚙ Triage Commands
Quick Answer
  • MySQL 8.4 introduces instant ADD COLUMN, improved JSON functions, and new system variables.
  • MySQL 9.0 adds vector support, enhanced security with TLS 1.3, and performance schema improvements.
  • Migration requires careful planning: test on staging, check compatibility, and use tools like mysqlcheck.
  • Key changes include removal of deprecated features like the mysql_native_password plugin.
  • Both versions focus on performance, security, and developer productivity.
✦ Definition~90s read
What is MySQL 8.4 and 9.0?

MySQL 8.4 and 9.0 are the latest versions of the popular open-source relational database, introducing new features for performance, security, and AI workloads.

Think of MySQL like a car.
Plain-English First

Think of MySQL like a car. MySQL 8.4 is a major service that adds new features (like a backup camera) and improves fuel efficiency. MySQL 9.0 is the next model year with even more advanced tech (like self-parking). Upgrading is like getting a new car—you need to check if your old accessories (applications) still fit.

MySQL has been the backbone of countless applications for decades. With the release of MySQL 8.4 and the upcoming MySQL 9.0, the database continues to evolve, offering new features that enhance performance, security, and developer experience. Whether you're running a small blog or a large-scale e-commerce platform, staying up-to-date with these versions is crucial for leveraging the latest capabilities and ensuring long-term support.

MySQL 8.4, released in April 2024, is a long-term support (LTS) release, meaning it will receive updates and security patches for several years. It introduces features like instant ADD COLUMN (no more table rebuilds for adding columns), improved JSON functions (JSON_VALUE, JSON_OVERLAPS), and new system variables for better resource management. On the other hand, MySQL 9.0, the first innovation release in the 9.x series, brings vector support for AI/ML workloads, enhanced security with TLS 1.3, and performance schema improvements for deeper insights.

Migrating to these versions requires careful planning. In this tutorial, we'll walk through the key features, provide practical examples, and outline a step-by-step migration strategy. By the end, you'll be equipped to upgrade your MySQL databases confidently, avoiding common pitfalls and taking advantage of the latest innovations.

1. Overview of MySQL 8.4 New Features

MySQL 8.4 is an LTS release that brings several significant enhancements. One of the most anticipated features is instant ADD COLUMN, which allows adding a column to a table without rebuilding the table, reducing downtime for large tables. However, this only works for columns that can be added without modifying existing rows (e.g., nullable columns or columns with a default that can be stored in the data dictionary). Another important feature is improved JSON support, including the JSON_VALUE() function for extracting values from JSON documents and JSON_OVERLAPS() for checking if two JSON documents share any key-value pairs. Additionally, MySQL 8.4 introduces new system variables like 'innodb_dedicated_server' for automatic buffer pool sizing, and 'max_execution_time' for limiting query execution time. Security enhancements include the removal of the deprecated mysql_native_password plugin (now caching_sha2_password is default) and improved TLS configuration.

instant_add_column.sqlSQL
1
2
3
4
5
6
7
8
9
-- Example: Instant ADD COLUMN (works for nullable columns)
ALTER TABLE employees ADD COLUMN middle_name VARCHAR(50) NULL, ALGORITHM=INSTANT;

-- Example: Non-instant ADD COLUMN (requires rebuild)
ALTER TABLE employees ADD COLUMN salary DECIMAL(10,2) NOT NULL DEFAULT 0, ALGORITHM=INSTANT;
-- This will fail with error 1845 because it requires backfill.

-- Use JSON_VALUE to extract data
SELECT JSON_VALUE('{"name": "John"}', '$.name') AS name;
Output
Query OK, 0 rows affected (0.01 sec)
ERROR 1845 (0A000): ALGORITHM=INSTANT is not supported for this operation. Try ALGORITHM=INPLACE or ALGORITHM=COPY.
+------+
| name |
+------+
| John |
+------+
⚠ Instant ADD COLUMN Limitations
📊 Production Insight
In production, use pt-online-schema-change for large tables even if instant DDL is available, as it provides more control and rollback capabilities.
🎯 Key Takeaway
MySQL 8.4 introduces instant DDL for adding columns, but only for certain column types. Always verify with ALGORITHM=INSTANT.

2. MySQL 9.0: Innovation Release Highlights

MySQL 9.0 is the first innovation release in the 9.x series, focusing on new features for modern workloads. The standout feature is vector support, which enables storage and querying of vector embeddings for AI and machine learning applications. MySQL 9.0 introduces a new VECTOR data type and functions like VECTOR_DISTANCE() for similarity search. This allows developers to build recommendation systems, semantic search, and other AI-powered features directly in MySQL without external tools. Security improvements include TLS 1.3 support for encrypted connections, deprecation of older TLS versions, and enhanced audit logging. Performance schema gains new instruments for monitoring memory usage and thread activity. Additionally, MySQL 9.0 removes several deprecated features, including the mysql_native_password plugin (now fully removed), the GROUP BY ASC/DESC syntax, and the FLUSH QUERY CACHE statement (query cache was removed in 8.0).

vector_example.sqlSQL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
-- Create a table with a VECTOR column (MySQL 9.0+)
CREATE TABLE products (
    id INT PRIMARY KEY,
    name VARCHAR(100),
    embedding VECTOR(128)
);

-- Insert vector data
INSERT INTO products VALUES (1, 'Laptop', TO_VECTOR('[0.1, 0.2, ...]'));

-- Find similar products using cosine distance
SELECT id, name, VECTOR_DISTANCE(embedding, TO_VECTOR('[0.1, 0.2, ...]')) AS distance
FROM products
ORDER BY distance ASC
LIMIT 10;
Output
Query OK, 0 rows affected (0.02 sec)
Query OK, 1 row affected (0.01 sec)
+----+--------+---------------------+
| id | name | distance |
+----+--------+---------------------+
| 1 | Laptop | 0.0000000000000000 |
+----+--------+---------------------+
🔥Vector Support in MySQL 9.0
📊 Production Insight
When migrating to 9.0, check for any deprecated features used in your codebase. The removal of mysql_native_password may require updating connection strings and user authentication.
🎯 Key Takeaway
MySQL 9.0 brings native vector support for AI workloads, along with TLS 1.3 and removal of deprecated features.

3. Preparing for Migration: Pre-Upgrade Checklist

Before upgrading to MySQL 8.4 or 9.0, thorough preparation is essential to avoid downtime and compatibility issues. Start by reviewing the release notes for deprecated and removed features. For MySQL 8.4, note that the mysql_native_password plugin is deprecated; for 9.0, it's removed. Check your application's database drivers and ORM compatibility. Use the MySQL Upgrade Checker tool (mysqlcheck) to identify potential issues. This tool scans your database for incompatible syntax, data types, and configurations. Also, ensure your hardware meets the new system requirements, especially for memory and disk space. Backup your data and test the upgrade on a staging environment that mirrors production. Finally, plan for a maintenance window and have a rollback strategy.

pre_upgrade_check.sqlSQL
1
2
3
4
5
6
7
8
-- Run mysqlcheck to check compatibility
mysqlcheck -u root -p --all-databases --check-upgrade

-- Check for deprecated features
SELECT * FROM information_schema.OPTIMIZER_TRACE WHERE QUERY LIKE '%deprecated%';

-- List users with old authentication plugin
SELECT user, host, plugin FROM mysql.user WHERE plugin NOT IN ('caching_sha2_password', 'sha256_password');
Output
mysqlcheck: [Warning] Using a password on the command line interface can be insecure.
...
OK
Empty set (0.00 sec)
+----------+-----------+-----------------------+
| user | host | plugin |
+----------+-----------+-----------------------+
| old_user | % | mysql_native_password |
+----------+-----------+-----------------------+
1 row in set (0.00 sec)
💡Use MySQL Shell for Upgrade Checks
📊 Production Insight
In production, schedule the upgrade during low-traffic hours and have a rollback plan. Consider using a blue-green deployment strategy to minimize risk.
🎯 Key Takeaway
Always run pre-upgrade checks using mysqlcheck or MySQL Shell to identify compatibility issues before migration.

4. Step-by-Step Migration Process

The migration process involves several steps: backup, upgrade, and post-upgrade verification. First, take a full backup using mysqldump or physical backup tools like Percona XtraBackup. Then, upgrade the MySQL binaries on your server. For in-place upgrades, stop the MySQL service, replace the binaries, and restart. Alternatively, you can use a logical upgrade by dumping and restoring data. After restarting, run mysql_upgrade to update system tables and check for compatibility. This step is crucial for MySQL 8.4 and 9.0 as they introduce new system tables and data dictionary changes. Finally, verify the upgrade by checking the version, running test queries, and monitoring logs for errors. For replication setups, upgrade replicas first, then promote them to master if needed.

migration_steps.shBASH
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Step 1: Backup
mysqldump -u root -p --all-databases --routines --events --triggers > full_backup.sql

# Step 2: Stop MySQL
sudo systemctl stop mysql

# Step 3: Replace binaries (example for Ubuntu)
sudo apt-get update
sudo apt-get install mysql-server-8.4

# Step 4: Start MySQL
sudo systemctl start mysql

# Step 5: Run mysql_upgrade
sudo mysql_upgrade -u root -p

# Step 6: Verify version
mysql -u root -p -e "SELECT VERSION();"
Output
mysql: [Warning] Using a password on the command line interface can be insecure.
+-----------+
| VERSION() |
+-----------+
| 8.4.0 |
+-----------+
⚠ Downgrade Limitations
📊 Production Insight
For large databases, consider using MySQL InnoDB Cluster or Group Replication to perform rolling upgrades with minimal downtime.
🎯 Key Takeaway
Follow a structured upgrade process: backup, replace binaries, run mysql_upgrade, and verify. Always test on staging first.

5. Post-Migration Verification and Optimization

After migration, it's critical to verify that everything works correctly. Start by checking the MySQL error log for any warnings or errors. Run ANALYZE TABLE on all tables to update optimizer statistics, as the new version may have different cost models. Review slow query logs to identify any performance regressions. Update your application's database drivers to versions that support the new MySQL version. For MySQL 9.0, ensure your ORM supports the VECTOR data type if you plan to use it. Additionally, consider enabling new features like instant DDL for future schema changes. Finally, monitor replication lag if you have replicas, as the binary log format may have changed.

post_migration.sqlSQL
1
2
3
4
5
6
7
8
9
10
11
-- Update optimizer statistics
ANALYZE TABLE employees;

-- Check for errors in the log
SHOW VARIABLES LIKE 'log_error';

-- Enable instant DDL for future alterations
SET GLOBAL innodb_alter_table_default_algorithm=INSTANT;

-- Verify replication status (if applicable)
SHOW SLAVE STATUS\G
Output
+-------------+-----------+
| Table | Op |
+-------------+-----------+
| test.employees | analyze |
+-------------+-----------+
+---------------+---------------------+
| Variable_name | Value |
+---------------+---------------------+
| log_error | /var/log/mysql/error.log |
+---------------+---------------------+
... (replication status output)
💡Enable Instant DDL by Default
📊 Production Insight
After migration, monitor performance for at least a week. Use Performance Schema to identify any new bottlenecks introduced by the upgrade.
🎯 Key Takeaway
Post-migration, update statistics, review logs, and enable new features gradually to ensure stability.

6. Handling Deprecated and Removed Features

MySQL 8.4 deprecates several features that are removed in 9.0. The most impactful is the mysql_native_password authentication plugin. If your application uses this plugin, you need to migrate users to caching_sha2_password. Additionally, the GROUP BY ASC/DESC syntax is deprecated; use ORDER BY instead. The FLUSH QUERY CACHE statement is removed (query cache was removed in 8.0). Also, the old temporal format (DATETIME with 2-digit year) is deprecated. To handle these changes, update your application code and database schema. For authentication migration, you can alter user accounts to use the new plugin. For SQL syntax, search for deprecated patterns and replace them.

handle_deprecated.sqlSQL
1
2
3
4
5
6
7
8
9
-- Migrate user to caching_sha2_password
ALTER USER 'old_user'@'%' IDENTIFIED WITH caching_sha2_password BY 'new_password';

-- Replace deprecated GROUP BY ASC/DESC
-- Old: SELECT col1, COUNT(*) FROM t GROUP BY col1 ASC;
-- New: SELECT col1, COUNT(*) FROM t GROUP BY col1 ORDER BY col1 ASC;

-- Check for old temporal format
SELECT * FROM information_schema.COLUMNS WHERE DATA_TYPE IN ('datetime', 'timestamp') AND CHARACTER_MAXIMUM_LENGTH = 2;
Output
Query OK, 0 rows affected (0.01 sec)
Empty set (0.00 sec)
🔥Authentication Plugin Migration
📊 Production Insight
Use the MySQL Upgrade Checker to generate a report of deprecated features used in your database. This helps prioritize fixes.
🎯 Key Takeaway
Identify and replace deprecated features before migrating to avoid breaking changes. User authentication is the most common issue.

7. Performance Improvements and Tuning

Both MySQL 8.4 and 9.0 bring performance improvements. In 8.4, the InnoDB buffer pool can be automatically sized using innodb_dedicated_server. This is especially useful for dedicated database servers. The new max_execution_time variable allows you to limit query execution time globally or per session, preventing runaway queries. In 9.0, the Performance Schema has been enhanced with new instruments for monitoring memory usage and thread activity. Additionally, the optimizer has been improved for better query plans, especially for JSON queries and window functions. To take advantage of these improvements, review your configuration and adjust settings accordingly. For example, enable innodb_dedicated_server if you have a dedicated server, and set appropriate timeouts.

performance_tuning.sqlSQL
1
2
3
4
5
6
7
8
-- Enable dedicated server mode (MySQL 8.4+)
SET GLOBAL innodb_dedicated_server=ON;

-- Set global query execution timeout (in milliseconds)
SET GLOBAL max_execution_time=30000; -- 30 seconds

-- Check Performance Schema memory instruments (MySQL 9.0+)
SELECT * FROM performance_schema.memory_summary_global_by_event_name WHERE EVENT_NAME LIKE '%memory%' LIMIT 5;
Output
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
+--------------------------------------------------+----------------+----------------+
| EVENT_NAME | COUNT_ALLOC | SUM_NUMBER_OF_BYTES_ALLOC |
+--------------------------------------------------+----------------+----------------+
| memory/innodb/buf_buf_pool | 1 | 134217728 |
| memory/innodb/log_buffer | 1 | 16777216 |
| memory/myisam/table_share | 10 | 10240 |
+--------------------------------------------------+----------------+----------------+
💡Test Performance Changes in Staging
📊 Production Insight
After tuning, monitor query response times and resource usage. Use Performance Schema to identify new bottlenecks.
🎯 Key Takeaway
Leverage new performance features like innodb_dedicated_server and max_execution_time to optimize your MySQL instance.

8. Security Enhancements and Best Practices

Security is a major focus in both MySQL 8.4 and 9.0. MySQL 8.4 deprecates the mysql_native_password plugin, and 9.0 removes it entirely. All users should use caching_sha2_password, which provides stronger password hashing. TLS 1.3 is supported in 9.0, offering faster and more secure encrypted connections. Additionally, MySQL 8.4 introduces the 'require_secure_transport' system variable to enforce encrypted connections. Audit logging has been improved with new event fields. To enhance security, update your authentication plugins, enable TLS, and configure firewalls. Also, review user privileges and remove unnecessary grants. Use the 'SHOW GRANTS' command to audit permissions.

security_enhancements.sqlSQL
1
2
3
4
5
6
7
8
9
10
11
-- Enforce secure transport (MySQL 8.4+)
SET GLOBAL require_secure_transport=ON;

-- Check TLS version (MySQL 9.0+)
SHOW STATUS LIKE 'Tls_version';

-- Audit user privileges
SHOW GRANTS FOR 'app_user'@'%';

-- Remove deprecated mysql_native_password users
ALTER USER 'old_user'@'%' IDENTIFIED WITH caching_sha2_password BY 'strong_password';
Output
Query OK, 0 rows affected (0.00 sec)
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| Tls_version | TLSv1.3,TLSv1.2 |
+---------------+-------+
+--------------------------------------------------------------+
| Grants for app_user@% |
+--------------------------------------------------------------+
| GRANT SELECT, INSERT ON *.* TO 'app_user'@'%' |
+--------------------------------------------------------------+
Query OK, 0 rows affected (0.01 sec)
⚠ Enforcing Secure Transport
📊 Production Insight
After enabling TLS, monitor connection logs for any clients that fail to connect. Update connection strings accordingly.
🎯 Key Takeaway
Upgrade authentication to caching_sha2_password and enable TLS 1.3 to secure your MySQL connections.
● Production incidentPOST-MORTEMseverity: high

The Case of the Slow Migration: When Instant ADD COLUMN Wasn't Instant

Symptom
After adding a column to a large table, the application became unresponsive for several minutes.
Assumption
The developer assumed that MySQL 8.4's instant ADD COLUMN would make the operation instantaneous, as advertised.
Root cause
The column was added with a default value that required a backfill (e.g., adding a NOT NULL column with a default), which is not supported by instant ADD COLUMN. The operation fell back to a table rebuild, locking the table.
Fix
The developer reverted the change, added the column as nullable first, then updated the rows in batches, and finally altered the column to NOT NULL with a default.
Key lesson
  • Instant ADD COLUMN only works for columns that can be added without modifying existing rows (e.g., nullable columns or columns with a default that can be stored in the data dictionary).
  • Always test schema changes on a staging environment with similar data volume.
  • Use pt-online-schema-change or gh-ost for large tables if instant operations are not possible.
  • Monitor replication lag during schema changes.
  • Read the MySQL documentation thoroughly before relying on new features.
Production debug guideSymptom to Action4 entries
Symptom · 01
Table locked after ALTER TABLE
Fix
Check if the operation used instant algorithm. Use SHOW PROCESSLIST to see if the table is locked. Kill the query if needed and re-evaluate the ALTER statement.
Symptom · 02
Replication lag spikes after upgrade
Fix
Check binary log format and compatibility. Ensure all replicas are upgraded to the same version. Use SHOW SLAVE STATUS to monitor lag.
Symptom · 03
Authentication failures after upgrade
Fix
Verify authentication plugin compatibility. Old mysql_native_password users may need to be migrated to caching_sha2_password. Check user table and update plugin.
Symptom · 04
Queries running slower after upgrade
Fix
Check if optimizer statistics need to be updated. Run ANALYZE TABLE. Review execution plans for changes in optimizer behavior.
★ Quick Debug Cheat Sheet for MySQL MigrationCommon issues and immediate actions during MySQL 8.4/9.0 migration.
ALTER TABLE hangs
Immediate action
Check if instant DDL is supported
Commands
SHOW PROCESSLIST;
SELECT * FROM information_schema.INNODB_ALTER_TABLE_PROGRESS;
Fix now
Kill the ALTER query and use pt-online-schema-change.
Replication broken after upgrade+
Immediate action
Check binary log format
Commands
SHOW VARIABLES LIKE 'binlog_format';
SHOW SLAVE STATUS\G
Fix now
Set binlog_format=ROW on all servers and restart replication.
User cannot connect+
Immediate action
Check authentication plugin
Commands
SELECT user, plugin FROM mysql.user WHERE user='username';
ALTER USER 'username'@'host' IDENTIFIED WITH caching_sha2_password BY 'password';
Fix now
Update the user's authentication plugin to caching_sha2_password.
FeatureMySQL 8.4MySQL 9.0
Release TypeLTS (Long-Term Support)Innovation Release
Instant ADD COLUMNYesYes
Vector SupportNoYes (VECTOR data type)
TLS VersionTLS 1.2 (default)TLS 1.3 (default)
Authentication Plugincaching_sha2_password (default), mysql_native_password deprecatedcaching_sha2_password only, mysql_native_password removed
Performance SchemaEnhancedFurther enhanced with memory instruments
Query CacheRemoved (since 8.0)Removed
Group BY ASC/DESCDeprecatedRemoved
Support DurationSeveral yearsShort (until next innovation release)
⚙ Quick Reference
8 commands from this guide
FileCommand / CodePurpose
instant_add_column.sqlALTER TABLE employees ADD COLUMN middle_name VARCHAR(50) NULL, ALGORITHM=INSTANT...1. Overview of MySQL 8.4 New Features
vector_example.sqlCREATE TABLE products (2. MySQL 9.0
pre_upgrade_check.sqlmysqlcheck -u root -p --all-databases --check-upgrade3. Preparing for Migration
migration_steps.shmysqldump -u root -p --all-databases --routines --events --triggers > full_backu...4. Step-by-Step Migration Process
post_migration.sqlANALYZE TABLE employees;5. Post-Migration Verification and Optimization
handle_deprecated.sqlALTER USER 'old_user'@'%' IDENTIFIED WITH caching_sha2_password BY 'new_password...6. Handling Deprecated and Removed Features
performance_tuning.sqlSET GLOBAL innodb_dedicated_server=ON;7. Performance Improvements and Tuning
security_enhancements.sqlSET GLOBAL require_secure_transport=ON;8. Security Enhancements and Best Practices

Key takeaways

1
MySQL 8.4 is an LTS release with instant DDL, improved JSON, and security enhancements.
2
MySQL 9.0 introduces vector support, TLS 1.3, and removes deprecated features.
3
Migration requires careful planning
backup, pre-upgrade checks, and post-upgrade verification.
4
Update authentication plugins to caching_sha2_password before upgrading to 9.0.
5
Leverage new performance features like innodb_dedicated_server and max_execution_time.

Common mistakes to avoid

5 patterns
×

Assuming instant ADD COLUMN works for all column additions.

×

Not updating authentication plugins before upgrading to MySQL 9.0.

×

Skipping pre-upgrade checks.

×

Upgrading replicas before the master without proper planning.

×

Forgetting to update optimizer statistics after upgrade.

INTERVIEW PREP · PRACTICE MODE

Interview Questions on This Topic

Q01SENIOR
What is instant ADD COLUMN in MySQL 8.4 and when does it work?
Q02JUNIOR
How do you migrate a user from mysql_native_password to caching_sha2_pas...
Q03SENIOR
Explain the difference between LTS and Innovation releases in MySQL.
Q04SENIOR
What are the security enhancements in MySQL 9.0?
Q05SENIOR
How does vector support in MySQL 9.0 work?
Q01 of 05SENIOR

What is instant ADD COLUMN in MySQL 8.4 and when does it work?

ANSWER
Instant ADD COLUMN allows adding a column to a table without rebuilding the table. It works for nullable columns, columns with a default value that can be stored in the data dictionary, and columns added at the end of the table. It does not work for columns that require backfilling existing rows, such as NOT NULL columns with a default.
FAQ · 5 QUESTIONS

Frequently Asked Questions

01
Can I upgrade directly from MySQL 5.7 to 8.4?
02
What is the difference between LTS and Innovation releases?
03
Will my existing applications work with MySQL 9.0?
04
How do I enable instant ADD COLUMN?
05
What is the VECTOR data type in MySQL 9.0?
N
Naren Founder & Principal Engineer

20+ years shipping high-throughput database systems. Everything here is grounded in real deployments.

Follow
Verified
production tested
July 13, 2026
last updated
2,165
articles · all by Naren
🔥

That's MySQL & PostgreSQL. Mark it forged?

4 min read · try the examples if you haven't

Previous
Database Automation and Observability: Prometheus, Grafana, pg_stat
20 / 20 · MySQL & PostgreSQL
Next
Introduction to PL/SQL