3397
MySQLERRORNotableInnoDB / TablespacesHIGH confidence

Cannot drop tablespace when encryption is disabled

Production Risk

Medium — tablespace cannot be cleaned up until keyring is restored.

How to reproduce
trigger — this will error
trigger — this will error
DROP TABLESPACE encrypted_ts;

expected output

ERROR 3397 (HY000): Cannot drop tablespace with encryption disabled.

Fix

Re-enable keyring plugin then drop

Re-enable keyring plugin then drop
INSTALL PLUGIN keyring_file SONAME 'keyring_file.so'; DROP TABLESPACE encrypted_ts;

Why this works

A functional keyring allows MySQL to clean up encryption keys during tablespace drop.

What not to do

Sources
Official documentation ↗

MySQL 8.0 — 3397 ER_CANT_DROP_TABLESPACE_WITH_DISABLED_ENCRYPTION

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All MySQL errors