Skip to content
#Zustand#Prisma#Better-Auth#Next.js

When MySQL Turned Against Me

February 3, 20262 min read100 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.

Last updated Oct 19, 2026