3399
MySQLERRORNotableInnoDB / TablespacesHIGH confidence
Tablespace is not a shared tablespace
Production Risk
Low — DDL fails; no data is moved.
How to reproduce
trigger — this will error
trigger — this will error
ALTER TABLE t1 TABLESPACE innodb_file_per_table;
expected output
ERROR 3399 (HY000): Tablespace is not a shared tablespace.
Fix
Create and use a general tablespace
Create and use a general tablespace
CREATE TABLESPACE shared_ts ADD DATAFILE 'shared_ts.ibd'; ALTER TABLE t1 TABLESPACE shared_ts;
Why this works
General tablespaces are shared and accept multiple tables.
What not to do
✕
Sources
Official documentation ↗
MySQL 8.0 — 3399 ER_TABLESPACE_ISNOT_SHARED
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev