3402
MySQLERRORNotableInnoDB / TablespacesHIGH confidence
Invalid encryption request
Production Risk
Low — DDL fails; no encryption change occurs.
How to reproduce
trigger — this will error
trigger — this will error
ALTER TABLE t ENCRYPTION='Y';
expected output
ERROR 3402 (HY000): Invalid encryption request.
Fix
Create an encrypted tablespace and move the table
Create an encrypted tablespace and move the table
CREATE TABLESPACE enc_ts ADD DATAFILE 'enc_ts.ibd' ENCRYPTION='Y'; ALTER TABLE t TABLESPACE enc_ts;
Why this works
Moving the table to an encrypted tablespace satisfies the encryption requirement.
What not to do
✕
Sources
Official documentation ↗
MySQL 8.0 — 3402 ER_INVALID_ENCRYPTION_REQUEST
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev