3315
MySQLERRORNotableSpatial / GISHIGH confidence
Spatial Reference System SRID already exists
Production Risk
Low — DDL rejected; no data is modified.
How to reproduce
trigger — this will error
trigger — this will error
CREATE SPATIAL REFERENCE SYSTEM 4326 NAME 'Duplicate' DEFINITION '...';
expected output
ERROR 3315 (HY000): SRID 4326 already exists.
Fix
Choose a free SRID
Choose a free SRID
-- Query information_schema.ST_SPATIAL_REFERENCE_SYSTEMS for an unused SRID.
Why this works
Selecting an SRID not yet in the registry avoids the collision.
What not to do
✕
Sources
Official documentation ↗
MySQL 8.0 — 3315 ER_SRS_ID_ALREADY_EXISTS
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev