Upgrading MySQL 5.7 to 8.0 on AWS RDS is a necessary move for long-term security and supportability.
MySQL 5.7 is end-of-life upstream, and even with extended support options, staying current reduces operational and security risk.
One major prerequisite before the version jump is updating character sets from utf8mb3 to utf8mb4.
Upgrade checklist
- Take a reliable backup/snapshot.
- Convert table and column character sets to
utf8mb4. - Handle
NO_ZERO_IN_DATE/NO_ZERO_DATEbehavior insql_mode. - Run the engine upgrade to MySQL 8.0.
- Validate application behavior and query compatibility.
1) Backup first
Before modifying schema or parameter groups:
- Create an RDS snapshot.
- Confirm restore works (or at least validate snapshot availability and retention).
- Plan a rollback window before changing the engine version.
2) Convert tables from utf8mb3 to utf8mb4
Generate table conversion statements:
SELECT CONCAT(
'ALTER TABLE ', table_name,
' CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'
)
FROM information_schema.tables
WHERE table_schema = 'YourDBName'
AND table_collation LIKE 'utf8%'
AND table_collation <> 'utf8mb4_unicode_ci';
Copy generated output and run it in a separate query tab.
If the session drops or timeouts occur, rerun until all target tables are converted.
3) Convert columns from utf8mb3 to utf8mb4
Generate column-level conversion statements:
SELECT CONCAT(
'ALTER TABLE ', table_name,
' MODIFY ', column_name, ' ', column_type,
' CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'
)
FROM information_schema.columns
WHERE table_schema = 'YourDBName'
AND character_set_name LIKE 'utf8%'
AND collation_name = 'utf8_general_ci';
Run the generated statements and verify results.
This is especially important for text columns that still carry legacy collation.
4) Handle zero date/datetime/timestamp compatibility
If your data includes zero-date style values, strict SQL modes can break writes/reads after upgrade.
Create or use a custom parameter group
- RDS Console -> Parameter groups
- Engine: MySQL Community Edition
- Family: mysql8.0
Update sql_mode
Edit sql_mode and remove:
NO_ZERO_IN_DATENO_ZERO_DATE
Save changes and attach this parameter group to the DB instance.
Apply and reboot
- Modify DB instance to use the custom parameter group.
- Apply immediately (or during maintenance window).
- Reboot the instance so parameter changes take effect.
5) Run the RDS engine upgrade
Start the MySQL version upgrade in RDS after charset/collation cleanup and parameter alignment.
Upgrade duration varies by size and workload; small-to-medium environments often complete within tens of minutes.
Post-upgrade validation
- Check app connectivity and auth plugins.
- Validate key queries and stored procedures.
- Confirm collation/charset on critical tables.
- Review error logs for SQL mode and deprecated syntax warnings.
Final notes
The safest path is preparation first: backups, charset normalization, and parameter compatibility.
With those done, the MySQL 8.0 upgrade is much smoother and reduces production surprises.