#Zustand#Prisma#Better-Auth# Next.js

When MySQL Turned Against Me

2/3/2026
2 min read
68 VIEWS

The day started normally clear plan, good momentum, no red flags.
Then Prisma hit me with Error P3018 (MySQL Error 1071).

That’s when I learned MySQL has strict index key length limits. I was using Better-Auth, which relies on long, secure identifiers, and MySQL simply refused to accept the schema.

I tried everything: shortening columns, resetting migrations, debugging connection strings, even fixing a password issue caused by a single @ character. Nothing worked.

Then my disk filled up.

Next.js stopped building. Prisma stopped generating.
At that point, it felt personal.

So I stopped fighting and switched to PostgreSQL (Supabase).

The same schema worked instantly no complaints, no hacks.

Lesson learned: sometimes the problem isn’t your code, it’s the tool you’re forcing to cooperate.

LOG_REF: cml6nbyzt000004kynueoia1o // UPDATED Wed Feb 04 2026