What Is New in MySQL 8.1
MySQL 8.1 introduces a range of updates focused on performance, security, and developer experience. This release is part of the innovation-focused release series, delivering new features that are tested and ready for feedback before being considered for long-term support versions.
| Category | Key Changes |
|---|---|
| New Features | EXPLAIN schema, Extended optimizer hints, mysql_native_password deprecation flag |
| Performance | InnoDB buffer pool preloading, Optimizer cost model adjustments |
| Security | OpenSSL 3.0 support, FIPS mode enhancements |
| Replication | Asynchronous connection failover improvements |
| Deprecation & Removal | mysql_native_password plugin, ENCODE()/DECODE() functions |
What are the key developer-focused features in MySQL 8.1?
The EXPLAIN schema feature is a major win for developers debugging query performance. It allows you to format the output of EXPLAIN statements as a JSON document, making it far easier to parse and integrate with your application's monitoring or logging systems programmatically.
Extended optimizer hints give you more surgical control over query execution. You can now use hints like
SET_VAR to adjust system variables for a single statement, which is perfect for tuning a
problematic query without affecting the entire server's operation.
Deprecation warnings for the older mysql_native_password authentication plugin are now more
explicit. This push towards the stronger caching_sha2_password method is crucial for tightening
security, though you can temporarily suppress the warning if needed for legacy app compatibility.
How does MySQL 8.1 improve performance and scalability?
InnoDB buffer pool preloading gets smarter. You can now dump and reload buffer pool pages in a running system without needing a full server restart. This is a big deal for minimizing downtime during maintenance or after a crash, as it drastically cuts down on warm-up time.
The optimizer's cost model has been refined with updated default values for parameters like
memory_block_read_cost and disk_block_read_cost. These adjustments help the optimizer
make better decisions about query plans, often leading to faster execution on modern hardware.
For large-scale deployments, the enhancements to asynchronous connection failover for source-replica replication improve reliability. The system can now handle a larger number of replica failures and manage network outages more gracefully, which is essential for maintaining high availability.
What security enhancements should I be aware of in 8.1?
Support for OpenSSL 3.0.0 is the headline security update. This brings MySQL in line with the latest cryptographic standards and includes support for FIPS mode, which is a requirement for many government and enterprise environments that mandate validated cryptographic modules.
The functions ENCODE() and DECODE() have been deprecated and will be removed in a
future release. These old encryption functions are considered weak, and the move is to push developers towards
using more robust alternatives like AES_ENCRYPT() and AES_DECRYPT().
Compressed X Protocol connections now support the zstd algorithm, offering a better compression ratio than the existing zlib option. This can significantly reduce network overhead for database connections, especially over slower or more expensive links.
What has been deprecated or removed in this version?
The mysql_native_password authentication plugin is now explicitly deprecated. While it still works,
you'll see warnings encouraging a shift to the more secure caching_sha2_password. A new
--mysql-native-password option for MySQL client programs allows you to suppress this warning for
legacy tooling.
The ENCODE() and DECODE() functions are also on the deprecation list. If your
application still uses these for any reason, you should start planning a migration to AES-based encryption
functions immediately to avoid future breakage.
Several server error messages have been reclassified from warnings to notes. This change reduces log noise for conditions that are typically not errors, making it easier to spot genuine problems in your server logs.
FAQ
Should I upgrade my production database to MySQL 8.1?
MySQL 8.1 is an Innovation release, not
a Long-Term Support (LTS) release. It's intended for testing and development to provide feedback on new
features. For critical production systems, it's generally advised to wait for these features to be incorporated
into a future LTS release like the next MySQL 8.4 version.
How do I use the new EXPLAIN schema feature?
Append FORMAT=JSON to your EXPLAIN
statement. For example: EXPLAIN FORMAT=JSON SELECT * FROM my_table;. This returns the execution
plan as a detailed JSON document instead of the traditional tabular output, which is much easier for
applications to consume.
My application still uses mysql_native_password. Will it break?
No, it will continue to work
for now. However, you will see deprecation warnings. To suppress these warnings in your MySQL client, you can
use the new --mysql-native-password option when connecting. You should still plan to migrate to
caching_sha2_password.
What is the benefit of the new buffer pool preloading?
It allows you to save the state of the
InnoDB buffer pool and reload it later without a full server restart. This means after a restart, your database
can return to peak performance almost immediately instead of slowly reloading data from disk, which is a huge
advantage for availability.
Why were ENCODE() and DECODE() deprecated?
These functions use a very weak and outdated
encryption algorithm. They are not considered secure by modern standards. The MySQL team is deprecating them to
encourage developers to use the stronger, standards-based AES encryption functions (AES_ENCRYPT()
and AES_DECRYPT()) instead.