1669
MariaDBERRORCommonSchemaHIGH confidence

Column count in internal system table does not match expected value

Production Risk

High — authentication and grant operations may fail if mysql.user is corrupted.

What this means

An internal MySQL system table has a different number of columns than expected, usually because mysql_upgrade has not been run after a server upgrade.

Why it happens
  1. 1MySQL server was upgraded without running mysql_upgrade.
  2. 2System table definition was manually altered.
How to reproduce
trigger — this will error
trigger — this will error
-- Accessing mysql.user or other system tables after a partial upgrade

expected output

ERROR 1669 (HY000): Column count of mysql.user is wrong. Expected 45, found 43. The table is probably corrupted.

Fix

Run mysql_upgrade

Run mysql_upgrade
mysql_upgrade -u root -p

Why this works

mysql_upgrade adds any missing columns to system tables to match the current server version.

What not to do

Version notes

Sources
Official documentation ↗

MySQL 8.0 — 1669 ER_COL_COUNT_DOESNT_MATCH_CORRUPTED_V2

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

← All MariaDB errors