Error code

MySQL 1406

MYSQL1406
Database Error Code· An error code returned by a database server such as PostgreSQL or MySQL.

What it means

Data too long for column — string exceeds column size.

How to fix it

  1. Increase the column size with ALTER TABLE ... MODIFY COLUMN ... VARCHAR(<new_length>).
  2. Truncate or validate the value in application code before writing to the database.
  3. Review whether the column definition accounts for the maximum expected input length.

Not affiliated with MySQL. Answer summarized from the manufacturer's manual linked above; consult that source for the authoritative procedure.