3281
MariaDBERRORNotableGIS / GeometryHIGH confidence
Spatial reference system not found (alternate context)
Production Risk
Low — DDL fails; no data is written.
How to reproduce
trigger — this will error
trigger — this will error
CREATE TABLE t1 (geom GEOMETRY SRID 77777);
expected output
ERROR 3281 (HY000): There's no spatial reference system with SRID 77777.
Fix
Register the SRS first
Register the SRS first
CREATE SPATIAL REFERENCE SYSTEM 77777 NAME 'Custom' DEFINITION '...'; CREATE TABLE t1 (geom GEOMETRY SRID 77777);
Why this works
The SRS must exist before it can be used in a column definition.
What not to do
✕
Sources
Official documentation ↗
MySQL 8.0 — 3281 ER_SRS_NOT_FOUND2
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev