3215
MySQLERRORNotableDDLHIGH confidence

Incorrect file name

Production Risk

Low — DDL error.

Why it happens
  1. 1Tablespace or data file name contains invalid characters or exceeds the maximum length.
  2. 2File name does not follow MySQL naming conventions.
How to reproduce
trigger — this will error
trigger — this will error
CREATE TABLESPACE ts1 ADD DATAFILE '/invalid?name.ibd';

expected output

ERROR 3215 (HY000): Incorrect file name '/invalid?name.ibd'.

Fix

Use a valid file name

Use a valid file name
CREATE TABLESPACE ts1 ADD DATAFILE 'ts1.ibd';

Why this works

File names must use alphanumeric characters, underscores, and hyphens only.

What not to do

Sources
Official documentation ↗

MySQL 8.0 — 3215 ER_WRONG_FILE_NAME2

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

← All MySQL errors